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 | private $actions; |
||
34 | |||
35 | private $allow; |
||
36 | |||
37 | private $redirect; |
||
38 | |||
39 | private $params; |
||
40 | |||
41 | private $message; |
||
42 | |||
43 | private $userType; |
||
44 | |||
45 | private $action; |
||
46 | |||
47 | /** |
||
48 | * Initialization to get controller variable |
||
49 | * |
||
50 | * @param string $event The event to use. |
||
|
|||
51 | */ |
||
52 | 5 | public function initialize(array $config) |
|
67 | |||
68 | /** |
||
69 | * Initialization to get controller variable |
||
70 | * |
||
71 | * @param array $rules Array of rules for permissions. |
||
72 | * @return string '0' if user / group doesn't have permission, 1 if has permission |
||
73 | */ |
||
74 | 5 | public function allow ($rules) { |
|
84 | |||
85 | 5 | private function setUserValues() |
|
93 | |||
94 | 5 | private function bindConfiguration(array $rules) |
|
124 | |||
125 | 5 | private function applyGroupsRules(array $rules) |
|
137 | |||
138 | 5 | private function searchForApplyGroupRules($key) |
|
148 | |||
149 | 5 | private function notInArrayAction() |
|
153 | |||
154 | 5 | private function applyViewsRules(array $rules) |
|
162 | |||
163 | 2 | private function searchForApplyViewRules($key, $value) |
|
173 | |||
174 | 3 | private function redirectIfIsSet() |
|
185 | } |
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.