@@ -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, '. |
@@ -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) |