@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | protected function handle() { |
| 14 | 14 | |
| 15 | - if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register'); |
|
| 15 | + if (Auth::initial()) Request::redirect(INSTALL_PATH.'/admin/register'); |
|
| 16 | 16 | |
| 17 | 17 | return (new Auth\Action\Login)->handle(); |
| 18 | 18 | } |
@@ -12,7 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | protected function handle() { |
| 14 | 14 | |
| 15 | - if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register'); |
|
| 15 | + if (Auth::initial()) { |
|
| 16 | + Request::redirect(INSTALL_PATH . '/admin/register'); |
|
| 17 | + } |
|
| 16 | 18 | |
| 17 | 19 | return (new Auth\Action\Login)->handle(); |
| 18 | 20 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | protected function handle() { |
| 14 | 14 | |
| 15 | - if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register'); |
|
| 15 | + if (Auth::initial()) Request::redirect(INSTALL_PATH.'/admin/register'); |
|
| 16 | 16 | |
| 17 | 17 | return (new Auth\Action\Login)->handle(); |
| 18 | 18 | } |
@@ -12,7 +12,9 @@ |
||
| 12 | 12 | |
| 13 | 13 | protected function handle() { |
| 14 | 14 | |
| 15 | - if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register'); |
|
| 15 | + if (Auth::initial()) { |
|
| 16 | + Request::redirect(INSTALL_PATH . '/admin/register'); |
|
| 17 | + } |
|
| 16 | 18 | |
| 17 | 19 | return (new Auth\Action\Login)->handle(); |
| 18 | 20 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | protected function init() { |
| 14 | 14 | |
| 15 | - $this->config->addParam('active', '', function (bool $active) { |
|
| 15 | + $this->config->addParam('active', '', function(bool $active) { |
|
| 16 | 16 | |
| 17 | 17 | return ($active ? "ent.active = 1" : ''); |
| 18 | 18 | }); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * Set a name |
| 29 | 29 | * |
| 30 | - * @return the current tag object |
|
| 30 | + * @return Tag current tag object |
|
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | 33 | public function setName(string $name) : Tag { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * Set an attribute |
| 42 | 42 | * |
| 43 | - * @return the current tag object |
|
| 43 | + * @return Tag current tag object |
|
| 44 | 44 | */ |
| 45 | 45 | |
| 46 | 46 | public function setAttribute(string $name, string $value) : Tag { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * Set multiple attributes |
| 55 | 55 | * |
| 56 | - * @return the current tag object |
|
| 56 | + * @return Tag current tag object |
|
| 57 | 57 | */ |
| 58 | 58 | |
| 59 | 59 | public function setAttributes(array $attributes) : Tag { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | /** |
| 67 | 67 | * Set contents. The method expects a block, a string, or null |
| 68 | 68 | * |
| 69 | - * @return the current tag object |
|
| 69 | + * @return Tag current tag object |
|
| 70 | 70 | */ |
| 71 | 71 | |
| 72 | 72 | public function setContents($contents) : Tag { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | /** |
| 109 | 109 | * Get the tag as a block |
| 110 | 110 | * |
| 111 | - * @return the self-closing tag if no valid contents have been set, otherwise the regular tag |
|
| 111 | + * @return Template\Block self-closing tag if no valid contents have been set, otherwise the regular tag |
|
| 112 | 112 | */ |
| 113 | 113 | |
| 114 | 114 | public function getBlock() : Template\Block { |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | |
| 118 | 118 | $block = clone (self::$block ?? (self::$block = Template::createBlock( |
| 119 | 119 | |
| 120 | - '<$name${ for:attributes } $name$="$value$"{ / for:attributes }>' . |
|
| 120 | + '<$name${ for:attributes } $name$="$value$"{ / for:attributes }>'. |
|
| 121 | 121 | |
| 122 | 122 | '{ block:contents / }$contents${ ! block:closing }</$name$>{ / block:closing }' |
| 123 | 123 | ))); |
@@ -58,7 +58,9 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | public function setAttributes(array $attributes) : Tag { |
| 60 | 60 | |
| 61 | - foreach ($attributes as $name => $value) if (is_scalar($value)) $this->setAttribute($name, $value); |
|
| 61 | + foreach ($attributes as $name => $value) { |
|
| 62 | + if (is_scalar($value)) $this->setAttribute($name, $value); |
|
| 63 | + } |
|
| 62 | 64 | |
| 63 | 65 | return $this; |
| 64 | 66 | } |
@@ -71,7 +73,9 @@ discard block |
||
| 71 | 73 | |
| 72 | 74 | public function setContents($contents) : Tag { |
| 73 | 75 | |
| 74 | - if (Template::isBlock($contents) || is_scalar($contents) || is_null($contents)) $this->contents = $contents; |
|
| 76 | + if (Template::isBlock($contents) || is_scalar($contents) || is_null($contents)) { |
|
| 77 | + $this->contents = $contents; |
|
| 78 | + } |
|
| 75 | 79 | |
| 76 | 80 | return $this; |
| 77 | 81 | } |