1 | <?php |
||
10 | class UserPermissionsComponent extends Component { |
||
11 | |||
12 | /** |
||
13 | * Controller name |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | public $controller = null; |
||
18 | |||
19 | /** |
||
20 | * Session |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | public $session = null; |
||
25 | |||
26 | /** |
||
27 | * Components array |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | public $components = ['Flash']; |
||
32 | |||
33 | |||
34 | /** |
||
35 | * Initialization to get controller variable |
||
36 | * |
||
37 | * @param string $event The event to use. |
||
|
|||
38 | */ |
||
39 | 5 | public function initialize(array $config) |
|
54 | |||
55 | /** |
||
56 | * Initialization to get controller variable |
||
57 | * |
||
58 | * @param array $rules Array of rules for permissions. |
||
59 | * @return string '0' if user / group doesn't have permission, 1 if has permission |
||
60 | */ |
||
61 | 5 | public function allow ($rules) { |
|
71 | |||
72 | 5 | private function setUserValues() |
|
80 | |||
81 | 5 | private function bindConfiguration(array $rules) |
|
111 | |||
112 | 5 | private function applyGroupsRules(array $rules) : bool |
|
124 | |||
125 | 5 | private function searchForApplyGroupRules($key, $value) |
|
136 | |||
137 | 5 | private function notInArrayAction() |
|
141 | |||
142 | 5 | private function applyViewsRules(array $rules) |
|
150 | |||
151 | 2 | private function searchForApplyViewRules($key, $value) |
|
161 | |||
162 | 3 | private function redirectIfIsSet() |
|
173 | } |
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.