@@ -250,16 +250,13 @@ |
||
| 250 | 250 | if ($object instanceof RoleInterface) |
| 251 | 251 | { |
| 252 | 252 | $this->addRole((string)$object); |
| 253 | - } |
|
| 254 | - else if ($object instanceof ResourceInterface) |
|
| 253 | + } else if ($object instanceof ResourceInterface) |
|
| 255 | 254 | { |
| 256 | 255 | $this->addResource((string)$object); |
| 257 | - } |
|
| 258 | - else if ($object instanceof PermissionInterface) |
|
| 256 | + } else if ($object instanceof PermissionInterface) |
|
| 259 | 257 | { |
| 260 | 258 | $this->addPermission((string)$object); |
| 261 | - } |
|
| 262 | - else { |
|
| 259 | + } else { |
|
| 263 | 260 | throw new \Exception( |
| 264 | 261 | sprintf( |
| 265 | 262 | "%s must implement one of RoleInterface, '. |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * @param string $permission |
| 145 | 145 | * @param string[] $args |
| 146 | 146 | * @throws \Exception |
| 147 | - * @return void |
|
| 147 | + * @return boolean|null |
|
| 148 | 148 | */ |
| 149 | 149 | public function __call(string $permission, array $args) |
| 150 | 150 | { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | /** |
| 193 | 193 | * Add a new role object to the registry |
| 194 | 194 | * |
| 195 | - * @param string $role |
|
| 195 | + * @param string[] $role |
|
| 196 | 196 | * @return void |
| 197 | 197 | */ |
| 198 | 198 | public function addRole(string ...$role) |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | /** |
| 207 | 207 | * Add a new resource object to the registry |
| 208 | 208 | * |
| 209 | - * @param string $resource |
|
| 209 | + * @param string[] $resource |
|
| 210 | 210 | * @return void |
| 211 | 211 | */ |
| 212 | 212 | public function addResource(string ...$resource) |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * Automatically determine the type of an object and call the appropriate |
| 238 | 238 | * add method on it. |
| 239 | 239 | * |
| 240 | - * @param ObjectInterface $objects |
|
| 240 | + * @param ObjectInterface[] $objects |
|
| 241 | 241 | * @throws \Exception |
| 242 | 242 | * @return void |
| 243 | 243 | */ |