@@ -37,22 +37,22 @@ |
||
37 | 37 | * @method void setExpiration(int $expiration) |
38 | 38 | */ |
39 | 39 | class Direct extends Entity { |
40 | - /** @var string */ |
|
41 | - protected $userId; |
|
40 | + /** @var string */ |
|
41 | + protected $userId; |
|
42 | 42 | |
43 | - /** @var int */ |
|
44 | - protected $fileId; |
|
43 | + /** @var int */ |
|
44 | + protected $fileId; |
|
45 | 45 | |
46 | - /** @var string */ |
|
47 | - protected $token; |
|
46 | + /** @var string */ |
|
47 | + protected $token; |
|
48 | 48 | |
49 | - /** @var int */ |
|
50 | - protected $expiration; |
|
49 | + /** @var int */ |
|
50 | + protected $expiration; |
|
51 | 51 | |
52 | - public function __construct() { |
|
53 | - $this->addType('userId', 'string'); |
|
54 | - $this->addType('fileId', 'int'); |
|
55 | - $this->addType('token', 'string'); |
|
56 | - $this->addType('expiration', 'int'); |
|
57 | - } |
|
52 | + public function __construct() { |
|
53 | + $this->addType('userId', 'string'); |
|
54 | + $this->addType('fileId', 'int'); |
|
55 | + $this->addType('token', 'string'); |
|
56 | + $this->addType('expiration', 'int'); |
|
57 | + } |
|
58 | 58 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface IGroupDetailsBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function getGroupDetails(string $gid): array; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function getGroupDetails(string $gid): array; |
|
36 | 36 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface IIsAdminBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function isAdmin(string $uid): bool; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function isAdmin(string $uid): bool; |
|
36 | 36 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface ICreateGroupBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function createGroup(string $gid): bool; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function createGroup(string $gid): bool; |
|
36 | 36 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface ICountUsersBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function countUsersInGroup(string $gid, string $search = ''): int; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function countUsersInGroup(string $gid, string $search = ''): int; |
|
36 | 36 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface IAddToGroupBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function addToGroup(string $uid, string $gid): bool; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function addToGroup(string $uid, string $gid): bool; |
|
36 | 36 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface IRemoveFromGroupBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function removeFromGroup(string $uid, string $gid); |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function removeFromGroup(string $uid, string $gid); |
|
36 | 36 | } |
@@ -31,37 +31,37 @@ |
||
31 | 31 | */ |
32 | 32 | abstract class ABackend implements GroupInterface { |
33 | 33 | |
34 | - /** |
|
35 | - * @deprecated 14.0.0 |
|
36 | - * |
|
37 | - * @param int $actions The action to check for |
|
38 | - * @return bool |
|
39 | - */ |
|
40 | - public function implementsActions($actions): bool { |
|
41 | - $implements = 0; |
|
34 | + /** |
|
35 | + * @deprecated 14.0.0 |
|
36 | + * |
|
37 | + * @param int $actions The action to check for |
|
38 | + * @return bool |
|
39 | + */ |
|
40 | + public function implementsActions($actions): bool { |
|
41 | + $implements = 0; |
|
42 | 42 | |
43 | - if ($this instanceof IAddToGroupBackend) { |
|
44 | - $implements |= GroupInterface::ADD_TO_GROUP; |
|
45 | - } |
|
46 | - if ($this instanceof ICountUsersBackend) { |
|
47 | - $implements |= GroupInterface::COUNT_USERS; |
|
48 | - } |
|
49 | - if ($this instanceof ICreateGroupBackend) { |
|
50 | - $implements |= GroupInterface::CREATE_GROUP; |
|
51 | - } |
|
52 | - if ($this instanceof IDeleteGroupBackend) { |
|
53 | - $implements |= GroupInterface::DELETE_GROUP; |
|
54 | - } |
|
55 | - if ($this instanceof IGroupDetailsBackend) { |
|
56 | - $implements |= GroupInterface::GROUP_DETAILS; |
|
57 | - } |
|
58 | - if ($this instanceof IIsAdminBackend) { |
|
59 | - $implements |= GroupInterface::IS_ADMIN; |
|
60 | - } |
|
61 | - if ($this instanceof IRemoveFromGroupBackend) { |
|
62 | - $implements |= GroupInterface::REMOVE_FROM_GOUP; |
|
63 | - } |
|
43 | + if ($this instanceof IAddToGroupBackend) { |
|
44 | + $implements |= GroupInterface::ADD_TO_GROUP; |
|
45 | + } |
|
46 | + if ($this instanceof ICountUsersBackend) { |
|
47 | + $implements |= GroupInterface::COUNT_USERS; |
|
48 | + } |
|
49 | + if ($this instanceof ICreateGroupBackend) { |
|
50 | + $implements |= GroupInterface::CREATE_GROUP; |
|
51 | + } |
|
52 | + if ($this instanceof IDeleteGroupBackend) { |
|
53 | + $implements |= GroupInterface::DELETE_GROUP; |
|
54 | + } |
|
55 | + if ($this instanceof IGroupDetailsBackend) { |
|
56 | + $implements |= GroupInterface::GROUP_DETAILS; |
|
57 | + } |
|
58 | + if ($this instanceof IIsAdminBackend) { |
|
59 | + $implements |= GroupInterface::IS_ADMIN; |
|
60 | + } |
|
61 | + if ($this instanceof IRemoveFromGroupBackend) { |
|
62 | + $implements |= GroupInterface::REMOVE_FROM_GOUP; |
|
63 | + } |
|
64 | 64 | |
65 | - return (bool)($actions & $implements); |
|
66 | - } |
|
65 | + return (bool)($actions & $implements); |
|
66 | + } |
|
67 | 67 | } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | interface IDeleteGroupBackend { |
31 | 31 | |
32 | - /** |
|
33 | - * @since 14.0.0 |
|
34 | - */ |
|
35 | - public function deleteGroup(string $gid): bool; |
|
32 | + /** |
|
33 | + * @since 14.0.0 |
|
34 | + */ |
|
35 | + public function deleteGroup(string $gid): bool; |
|
36 | 36 | } |