From 8b9afc52af99dcc35118702318631579f051f6b9 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Thu, 10 Aug 2023 18:57:40 +0300 Subject: [PATCH] Filter sinceId in dialog list method --- phpstan-baseline.neon | 5 +++++ src/Bot/Model/Request/DialogsRequest.php | 25 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 6744e8d..25f506f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1285,6 +1285,11 @@ parameters: count: 1 path: src/Bot/Model/Request/DialogsRequest.php + - + message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\DialogsRequest\\:\\:setSinceId\\(\\) has no return typehint specified\\.$#" + count: 1 + path: src/Bot/Model/Request/DialogsRequest.php + - message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\DialogsRequest\\:\\:setBotId\\(\\) has no return typehint specified\\.$#" count: 1 diff --git a/src/Bot/Model/Request/DialogsRequest.php b/src/Bot/Model/Request/DialogsRequest.php index f6ac9a5..dce064b 100644 --- a/src/Bot/Model/Request/DialogsRequest.php +++ b/src/Bot/Model/Request/DialogsRequest.php @@ -25,6 +25,15 @@ class DialogsRequest implements ModelInterface use CommonFields; use PageLimit; + /** + * @var int $sinceId + * + * @Type("int") + * @Accessor(getter="getSinceId",setter="setSinceId") + * @SkipWhenEmpty + */ + private $sinceId; + /** * @var int $chatId * @@ -70,6 +79,22 @@ class DialogsRequest implements ModelInterface */ private $assign; + /** + * @return int + */ + public function getSinceId() + { + return $this->sinceId; + } + + /** + * @param int $sinceId + */ + public function setSinceId(int $sinceId) + { + $this->sinceId = $sinceId; + } + /** * @return int */