@@ -30,7 +30,7 @@ |
||
| 30 | 30 | function register(): void |
| 31 | 31 | { |
| 32 | 32 | // Do nothing if running in cli. |
| 33 | - if(php_sapi_name() !== 'cli') |
|
| 33 | + if (php_sapi_name() !== 'cli') |
|
| 34 | 34 | { |
| 35 | 35 | _register(); |
| 36 | 36 | }; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | use Jaxon\App\Metadata\Metadata; |
| 19 | 19 | use Attribute; |
| 20 | 20 | |
| 21 | -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] |
|
| 21 | +#[Attribute(Attribute::TARGET_CLASS|Attribute::TARGET_METHOD|Attribute::IS_REPEATABLE)] |
|
| 22 | 22 | class Before extends AbstractAttribute |
| 23 | 23 | { |
| 24 | 24 | /** |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | use Jaxon\App\Metadata\Metadata; |
| 19 | 19 | use Attribute; |
| 20 | 20 | |
| 21 | -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] |
|
| 21 | +#[Attribute(Attribute::TARGET_CLASS|Attribute::TARGET_METHOD|Attribute::IS_REPEATABLE)] |
|
| 22 | 22 | class Callback extends AbstractAttribute |
| 23 | 23 | { |
| 24 | 24 | /** |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | use function ltrim; |
| 23 | 23 | |
| 24 | -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] |
|
| 24 | +#[Attribute(Attribute::TARGET_CLASS|Attribute::TARGET_PROPERTY|Attribute::TARGET_METHOD|Attribute::IS_REPEATABLE)] |
|
| 25 | 25 | class Inject extends AbstractAttribute |
| 26 | 26 | { |
| 27 | 27 | /** |
@@ -92,17 +92,17 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function validate(): void |
| 94 | 94 | { |
| 95 | - if($this->nTarget === Attribute::TARGET_CLASS) |
|
| 95 | + if ($this->nTarget === Attribute::TARGET_CLASS) |
|
| 96 | 96 | { |
| 97 | - if(!$this->attr || !$this->type) |
|
| 97 | + if (!$this->attr || !$this->type) |
|
| 98 | 98 | { |
| 99 | 99 | throw new SetupException('When applied to a class, the Inject attribute requires two arguments.'); |
| 100 | 100 | } |
| 101 | 101 | return; |
| 102 | 102 | } |
| 103 | - if($this->nTarget === Attribute::TARGET_METHOD) |
|
| 103 | + if ($this->nTarget === Attribute::TARGET_METHOD) |
|
| 104 | 104 | { |
| 105 | - if(!$this->attr) |
|
| 105 | + if (!$this->attr) |
|
| 106 | 106 | { |
| 107 | 107 | throw new SetupException('When applied to a method, the Inject attribute requires the "attr" argument.'); |
| 108 | 108 | } |
@@ -115,13 +115,13 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | private function getFullClassName(): void |
| 117 | 117 | { |
| 118 | - if(!$this->type) |
|
| 118 | + if (!$this->type) |
|
| 119 | 119 | { |
| 120 | 120 | // If no type is provided, take the attribute type. |
| 121 | 121 | $this->type = $this->aTypes[$this->attr] ?? ''; |
| 122 | 122 | return; |
| 123 | 123 | } |
| 124 | - if($this->type[0] === '\\') |
|
| 124 | + if ($this->type[0] === '\\') |
|
| 125 | 125 | { |
| 126 | 126 | $this->type = ltrim($this->type, '\\'); |
| 127 | 127 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | use Jaxon\App\Metadata\Metadata; |
| 19 | 19 | use Attribute; |
| 20 | 20 | |
| 21 | -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] |
|
| 21 | +#[Attribute(Attribute::TARGET_CLASS|Attribute::TARGET_METHOD)] |
|
| 22 | 22 | class Exclude extends AbstractAttribute |
| 23 | 23 | { |
| 24 | 24 | /** |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | use Jaxon\App\Metadata\Metadata; |
| 19 | 19 | use Attribute; |
| 20 | 20 | |
| 21 | -#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)] |
|
| 21 | +#[Attribute(Attribute::TARGET_CLASS|Attribute::TARGET_METHOD|Attribute::IS_REPEATABLE)] |
|
| 22 | 22 | class After extends AbstractAttribute |
| 23 | 23 | { |
| 24 | 24 | /** |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | */ |
| 96 | 96 | public function delete(string $sKey): void |
| 97 | 97 | { |
| 98 | - if(isset($_SESSION[$sKey])) |
|
| 98 | + if (isset($_SESSION[$sKey])) |
|
| 99 | 99 | { |
| 100 | 100 | unset($_SESSION[$sKey]); |
| 101 | 101 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | |
| 68 | 68 | public function param($param) |
| 69 | 69 | { |
| 70 | - if($this->method === 'param' && $this->args[0] === $param) |
|
| 70 | + if ($this->method === 'param' && $this->args[0] === $param) |
|
| 71 | 71 | { |
| 72 | 72 | $this->response->html('div-id', 'This is the method with params!'); |
| 73 | 73 | } |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <ul class="pagination"><?php |
| 2 | - if(($this->prev)) |
|
| 2 | + if (($this->prev)) |
|
| 3 | 3 | { |
| 4 | 4 | echo $this->prev; |
| 5 | 5 | } |
| 6 | - foreach($this->links as $link) |
|
| 6 | + foreach ($this->links as $link) |
|
| 7 | 7 | { |
| 8 | 8 | echo $link; |
| 9 | 9 | } |
| 10 | - if(($this->next)) |
|
| 10 | + if (($this->next)) |
|
| 11 | 11 | { |
| 12 | 12 | echo $this->next; |
| 13 | 13 | } |