These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php declare (strict_types=1); |
||
2 | |||
3 | /** |
||
4 | * This file is part of the Samshal\Acl library |
||
5 | * |
||
6 | * @license MIT |
||
7 | * @copyright Copyright (c) 2016 Samshal http://samshal.github.com |
||
8 | */ |
||
9 | namespace Samshal\Acl; |
||
10 | |||
11 | /** |
||
12 | * Interface AclInterface. |
||
13 | * |
||
14 | * A contract that the Acl class must always obey |
||
15 | * |
||
16 | * @package samshal.acl |
||
17 | * @author Samuel Adeshina <[email protected]> |
||
18 | * @since 30/05/2016 |
||
19 | */ |
||
20 | interface AclInterface |
||
21 | { |
||
22 | /** |
||
23 | * Adds a new role object to the registry |
||
24 | * |
||
25 | * @param string $role |
||
26 | * @return void |
||
27 | */ |
||
28 | public function addRole(string ...$role); |
||
29 | |||
30 | /** |
||
31 | * Adds a new resource object to the registry |
||
32 | * |
||
33 | * @param string $resource |
||
34 | * @return void |
||
35 | */ |
||
36 | public function addResource(string ...$resource); |
||
37 | |||
38 | /** |
||
39 | * Adds a new permission object to the registry |
||
40 | * |
||
41 | * @param string $permission |
||
42 | * @return void |
||
43 | */ |
||
44 | public function addPermission(string ...$permission); |
||
45 | |||
46 | /** |
||
47 | * Adds objects lazily. |
||
48 | * |
||
49 | * Automatically determine the type of an object and call the appropriate |
||
50 | * add method on it. |
||
51 | * |
||
52 | * @param ObjectInterface $object |
||
53 | * @throws \Exception |
||
54 | * @return void |
||
55 | */ |
||
56 | public function add(ObjectInterface ...$object); |
||
57 | |||
58 | /** |
||
59 | * Change the status option of an assigned permission to true |
||
60 | * |
||
61 | * @param string $role; |
||
0 ignored issues
–
show
|
|||
62 | * @param string $permission |
||
63 | * @param string $resource |
||
64 | * @param boolean $status Optional |
||
65 | * @throws \Exception |
||
66 | * @return void |
||
67 | */ |
||
68 | public function allow(string $role, string $permission, string $resource, bool $status=null); |
||
69 | |||
70 | /** |
||
71 | * Change the status option of an assigned permission to false |
||
72 | * |
||
73 | * @param string $role; |
||
0 ignored issues
–
show
There is no parameter named
$role; . Was it maybe removed?
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. Consider the following example. The parameter /**
* @param array $germany
* @param array $island
* @param array $italy
*/
function finale($germany, $island) {
return "2:1";
}
The most likely cause is that the parameter was removed, but the annotation was not.
Loading history...
|
|||
74 | * @param string $permission |
||
75 | * @param string $resource |
||
76 | * @return void |
||
77 | */ |
||
78 | public function deny(string $role, string $permission, string $resource); |
||
79 | } |
||
80 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.