mirror of
https://github.com/anthonyaxenov/atol-online.git
synced 2024-11-22 10:24:34 +00:00
Мелкофиксы в конструкторе KktMonitor
This commit is contained in:
parent
00b2643f42
commit
9d3344a0df
@ -56,8 +56,8 @@ class KktMonitor extends AtolClient
|
||||
protected function fetchAll(?int $limit = null, ?int $offset = null): KktResponse
|
||||
{
|
||||
$params = [];
|
||||
$limit && $params['limit'] = $limit;
|
||||
$offset && $params['offset'] = $offset;
|
||||
!is_null($limit) && $params['limit'] = $limit;
|
||||
!is_null($offset) && $params['offset'] = $offset;
|
||||
return $this->sendRequest('GET', self::getUrlToMethod('cash-registers'), $params);
|
||||
}
|
||||
|
||||
|
23
src/Enum.php
Normal file
23
src/Enum.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace AtolOnline;
|
||||
|
||||
use AtolOnline\Exceptions\InvalidEnumValueException;
|
||||
|
||||
/**
|
||||
* Расширение класса перечисления
|
||||
*/
|
||||
class Enum extends \MyCLabs\Enum\Enum
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @throws InvalidEnumValueException
|
||||
*/
|
||||
public static function isValid($value)
|
||||
{
|
||||
return parent::isValid($value)
|
||||
?: throw new InvalidEnumValueException(static::class, $value);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user