1
0
Fork 0
mirror of synced 2025-04-04 13:43:31 +03:00

Compare commits

...

8 commits

Author SHA1 Message Date
7a87f2669b
Merge pull request #54 from Chupocabra/refactor-members_req
Use CommonFields in MembersRequest
2025-03-26 11:42:56 +03:00
Alex Komarichev
f65dcac9f5 ignore phpstan setID type error 2025-03-26 11:33:11 +03:00
Alex Komarichev
9a23562cbd Use CommonFields in MembersRequest 2025-03-26 11:14:48 +03:00
141c2c9bc3
update actions version in ci 2025-03-26 11:09:50 +03:00
46e0f84265
Merge pull request #53 from kifril-ltd/role-hidden
Add new bot role `hidden`
2024-11-15 14:40:13 +03:00
Kirill Sukhorukov
dc0ead717e Add new bot role hidden 2024-11-14 15:46:02 +03:00
2d5a8ceaed
Added is_system to User 2024-11-05 12:42:01 +03:00
Alex Komarichev
2b798fa877 Added is_system to User 2024-11-05 12:28:27 +03:00
5 changed files with 34 additions and 52 deletions

View file

@ -15,14 +15,14 @@ jobs:
matrix:
php-version: ['7.3', '7.4', '8.0', '8.1']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v1
- name: Composer cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.HOME }}/.composer/cache
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}

View file

@ -1355,6 +1355,11 @@ parameters:
count: 1
path: src/Bot/Model/Request/MembersRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setId\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Bot/Model/Request/MembersRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MembersRequest\\:\\:setSince\\(\\) has no return typehint specified\\.$#"
count: 1

View file

@ -38,6 +38,7 @@ class Constants
const BOT_ROLE_DISTRIBUTOR = "distributor";
const BOT_ROLE_RESPONSIBLE = "responsible";
const BOT_ROLE_HIDDEN = "hidden";
const MESSAGE_SCOPE_PUBLIC = "public";
const MESSAGE_SCOPE_PRIVATE = "private";

View file

@ -142,6 +142,15 @@ class User implements ModelInterface
*/
private $revokedAt;
/**
* @var bool $isSystem
*
* @Type("bool")
* @Accessor(getter="isSystem",setter="setIsSystem")
* @SkipWhenEmpty()
*/
private $isSystem;
/**
* @return string|null
*/
@ -349,4 +358,20 @@ class User implements ModelInterface
{
$this->revokedAt = $revokedAt;
}
/**
* @return bool|null
*/
public function isSystem(): ?bool
{
return $this->isSystem;
}
/**
* @param bool $isSystem
*/
public function setIsSystem(bool $isSystem): void
{
$this->isSystem = $isSystem;
}
}

View file

@ -22,6 +22,7 @@ use RetailCrm\Mg\Bot\Model\ModelInterface;
*/
class MembersRequest implements ModelInterface
{
use CommonFields;
use PageLimit;
/**
@ -51,24 +52,6 @@ class MembersRequest implements ModelInterface
*/
private $state;
/**
* @var string $since
*
* @Type("string")
* @Accessor(getter="getSince",setter="setSince")
* @SkipWhenEmpty
*/
private $since;
/**
* @var string $until
*
* @Type("string")
* @Accessor(getter="getUntil",setter="setUntil")
* @SkipWhenEmpty
*/
private $until;
/**
* @return int
*/
@ -116,36 +99,4 @@ class MembersRequest implements ModelInterface
{
$this->state = $state;
}
/**
* @return string
*/
public function getSince()
{
return $this->since;
}
/**
* @param string $since
*/
public function setSince(string $since)
{
$this->since = $since;
}
/**
* @return string
*/
public function getUntil()
{
return $this->until;
}
/**
* @param string $until
*/
public function setUntil(string $until)
{
$this->until = $until;
}
}