@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * Return all resources. |
57 | 57 | * |
58 | - * @return array|Resource[] |
|
58 | + * @return \SimpleAcl\Object[] |
|
59 | 59 | */ |
60 | 60 | public function getResources() |
61 | 61 | { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @param $resourceName |
79 | 79 | * |
80 | - * @return null|Resource |
|
80 | + * @return \SimpleAcl\Object|null |
|
81 | 81 | */ |
82 | 82 | public function getResource($resourceName) |
83 | 83 | { |
@@ -77,7 +77,7 @@ |
||
77 | 77 | * |
78 | 78 | * @param $roleName |
79 | 79 | * |
80 | - * @return null|Role |
|
80 | + * @return \SimpleAcl\Object|null |
|
81 | 81 | */ |
82 | 82 | public function getRole($roleName) |
83 | 83 | { |
@@ -188,7 +188,7 @@ |
||
188 | 188 | * Check owing Role & Resource (and their children) and match its with $roleName & $resourceName; |
189 | 189 | * if match was found depending on action allow or deny access to $resourceName for $roleName. |
190 | 190 | * |
191 | - * @param $needRuleName |
|
191 | + * @param string $needRuleName |
|
192 | 192 | * @param string $needRoleName |
193 | 193 | * @param string $needResourceName |
194 | 194 | * |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | null === $ruleResult |
162 | 162 | ) { |
163 | 163 | if (null !== $actionResult) { |
164 | - return (bool)$actionResult; |
|
164 | + return (bool) $actionResult; |
|
165 | 165 | } else { |
166 | 166 | return null; |
167 | 167 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $actionResult = call_user_func($this->action, $ruleResult); |
171 | 171 | |
172 | 172 | if (null !== $actionResult) { |
173 | - return (bool)$actionResult; |
|
173 | + return (bool) $actionResult; |
|
174 | 174 | } else { |
175 | 175 | return null; |
176 | 176 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | public function __construct(Rule $rule, $priority, $needRoleName, $needResourceName) |
56 | 56 | { |
57 | - $this->id = bin2hex(openssl_random_pseudo_bytes(10));; |
|
57 | + $this->id = bin2hex(openssl_random_pseudo_bytes(10)); ; |
|
58 | 58 | $this->rule = $rule; |
59 | 59 | $this->priority = $priority; |
60 | 60 | $this->needRoleName = $needRoleName; |