From 9d3344a0dfaeb823c8c442bd0125b1be6a312276 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Mon, 22 Nov 2021 14:52:27 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=BE=D1=84=D0=B8?= =?UTF-8?q?=D0=BA=D1=81=D1=8B=20=D0=B2=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82?= =?UTF-8?q?=D1=80=D1=83=D0=BA=D1=82=D0=BE=D1=80=D0=B5=20KktMonitor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Api/KktMonitor.php | 4 ++-- src/Enum.php | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 src/Enum.php diff --git a/src/Api/KktMonitor.php b/src/Api/KktMonitor.php index 037af92..1e63643 100644 --- a/src/Api/KktMonitor.php +++ b/src/Api/KktMonitor.php @@ -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); } diff --git a/src/Enum.php b/src/Enum.php new file mode 100644 index 0000000..cfa866a --- /dev/null +++ b/src/Enum.php @@ -0,0 +1,23 @@ +