@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Menu; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Menu; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Menu; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Menu; |
| 5 | 5 | |
@@ -28,9 +28,9 @@ discard block |
||
| 28 | 28 | * @throws \InvalidArgumentException |
| 29 | 29 | */ |
| 30 | 30 | function isAllowed($parameter = NULL): bool { |
| 31 | - if(is_null($parameter)) { |
|
| 31 | + if (is_null($parameter)) { |
|
| 32 | 32 | return true; |
| 33 | - } elseif(!is_bool($parameter)) { |
|
| 33 | + } elseif (!is_bool($parameter)) { |
|
| 34 | 34 | throw new \InvalidArgumentException("Method " . static::class . "::isAllowed expects boolean as parameter."); |
| 35 | 35 | } |
| 36 | 36 | return ($parameter === $this->user->isLoggedIn()); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Menu; |
| 5 | 5 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * @throws \InvalidArgumentException |
| 29 | 29 | */ |
| 30 | 30 | function isAllowed($parameter = NULL): bool { |
| 31 | - if(!is_string($parameter)) { |
|
| 31 | + if (!is_string($parameter)) { |
|
| 32 | 32 | throw new \InvalidArgumentException("Method " . static::class . "::isAllowed expects string as parameter."); |
| 33 | 33 | } |
| 34 | 34 | return $this->user->isInRole($parameter); |