@@ -19,10 +19,10 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | interface RoleInterface |
| 21 | 21 | { |
| 22 | - /** |
|
| 23 | - * Returns the description of a role object |
|
| 24 | - * |
|
| 25 | - * @return string |
|
| 26 | - */ |
|
| 27 | - public function getDescription() : string; |
|
| 22 | + /** |
|
| 23 | + * Returns the description of a role object |
|
| 24 | + * |
|
| 25 | + * @return string |
|
| 26 | + */ |
|
| 27 | + public function getDescription() : string; |
|
| 28 | 28 | } |
@@ -237,16 +237,13 @@ |
||
| 237 | 237 | if ($object instanceof RoleInterface) |
| 238 | 238 | { |
| 239 | 239 | $this->addRole((string)$object); |
| 240 | - } |
|
| 241 | - else if ($object instanceof ResourceInterface) |
|
| 240 | + } else if ($object instanceof ResourceInterface) |
|
| 242 | 241 | { |
| 243 | 242 | $this->addResource((string)$object); |
| 244 | - } |
|
| 245 | - else if ($object instanceof PermissionInterface) |
|
| 243 | + } else if ($object instanceof PermissionInterface) |
|
| 246 | 244 | { |
| 247 | 245 | $this->addPermission((string)$object); |
| 248 | - } |
|
| 249 | - else { |
|
| 246 | + } else { |
|
| 250 | 247 | throw new Exception( |
| 251 | 248 | sprintf( |
| 252 | 249 | "%s must implement one of RoleInterface, '. |