@@ -222,16 +222,13 @@ |
||
222 | 222 | if ($object instanceof RoleInterface) |
223 | 223 | { |
224 | 224 | $this->addRole((string)$object); |
225 | - } |
|
226 | - elseif ($object instanceof ResourceInterface) |
|
225 | + } elseif ($object instanceof ResourceInterface) |
|
227 | 226 | { |
228 | 227 | $this->addResource((string)$object); |
229 | - } |
|
230 | - elseif ($object instanceof PermissionInterface) |
|
228 | + } elseif ($object instanceof PermissionInterface) |
|
231 | 229 | { |
232 | 230 | $this->addPermission((string)$object); |
233 | - } |
|
234 | - else { |
|
231 | + } else { |
|
235 | 232 | throw new Exception("$object must implement one of RoleInterface, " . |
236 | 233 | "ResourceInterface and PermissionInterface"); |
237 | 234 | } |