@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @throws \Exception |
| 66 | 66 | * @return void |
| 67 | 67 | */ |
| 68 | - public function allow(string $role, string $permission, string $resource, bool $status=true); |
|
| 68 | + public function allow(string $role, string $permission, string $resource, bool $status = true); |
|
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * Change the status option of an assigned permission to false |
@@ -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, '. |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | * @throws \Exception |
| 280 | 280 | * @return void |
| 281 | 281 | */ |
| 282 | - public function allow(string $role, string $permission, string $resource, boolean $status=true) |
|
| 282 | + public function allow(string $role, string $permission, string $resource, boolean $status = true) |
|
| 283 | 283 | { |
| 284 | 284 | if (!$this->roleRegistry->exists($role)) { |
| 285 | 285 | throw new \Exception( |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * This file is part of the Samshal\Acl library |