1 | <?php |
||
8 | class PassportControl |
||
9 | { |
||
10 | /** @var EntityManager */ |
||
11 | private $entityManager; |
||
12 | |||
13 | /** |
||
14 | * PassportControl constructor. |
||
15 | * @param EntityManager $entityManager |
||
16 | */ |
||
17 | public function __construct(EntityManager $entityManager) |
||
21 | |||
22 | /** |
||
23 | * @param PassportInterface $passport |
||
24 | * @param ActionInterface $action |
||
25 | * @param ResourceInterface $resource |
||
26 | * @return bool |
||
27 | */ |
||
28 | public function isAuthorized(PassportInterface $passport, ActionInterface $action, ResourceInterface $resource): bool |
||
32 | |||
33 | /** |
||
34 | * @param PassportInterface $passport |
||
35 | * @param RoleInterface $role |
||
36 | * @param ResourceInterface $resource |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function grantEntitlement(PassportInterface $passport, RoleInterface $role, ResourceInterface $resource): bool |
||
43 | |||
44 | /** |
||
45 | * @param PassportInterface $passport |
||
46 | * @param RoleInterface $role |
||
47 | * @param ResourceInterface $resource |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function revokeEntitlement(PassportInterface $passport, RoleInterface $role, ResourceInterface $resource): bool |
||
54 | |||
55 | /** |
||
56 | * @param int $userId |
||
57 | * @return PassportInterface |
||
58 | */ |
||
59 | public function createNewPassport(int $userId): PassportInterface |
||
65 | } |
||
66 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.