@@ -20,7 +20,9 @@ |
||
20 | 20 | |
21 | 21 | $contents->getBlock('items')->addItem($item = View::get(static::$view_item)); |
22 | 22 | |
23 | - foreach ($data as $property => $value) $item->$property = $value; |
|
23 | + foreach ($data as $property => $value) { |
|
24 | + $item->$property = $value; |
|
25 | + } |
|
24 | 26 | |
25 | 27 | # Process item |
26 | 28 |
@@ -24,7 +24,9 @@ |
||
24 | 24 | |
25 | 25 | public static function __callStatic($name, $arguments) { |
26 | 26 | |
27 | - if (null !== static::$loader) return static::$loader->$name(...$arguments); |
|
27 | + if (null !== static::$loader) { |
|
28 | + return static::$loader->$name(...$arguments); |
|
29 | + } |
|
28 | 30 | } |
29 | 31 | } |
30 | 32 | } |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | |
22 | 22 | # Throw error if no extensions found |
23 | 23 | |
24 | - if (false === static::$loader->active()) throw new static::$exception_class; |
|
24 | + if (false === static::$loader->active()) { |
|
25 | + throw new static::$exception_class; |
|
26 | + } |
|
25 | 27 | |
26 | 28 | # Activate user defined extension |
27 | 29 | |
@@ -29,9 +31,10 @@ discard block |
||
29 | 31 | |
30 | 32 | $name = static::$name; $param = static::$param[static::$loader->section()]; |
31 | 33 | |
32 | - if (static::$loader->activate(Request::get($name)) || static::$loader->activate(Cookie::get($param))) |
|
33 | - |
|
34 | + if (static::$loader->activate(Request::get($name)) || static::$loader->activate(Cookie::get($param))) { |
|
35 | + |
|
34 | 36 | Cookie::set($param, static::$loader->data('name'), static::$cookie_expires); |
37 | + } |
|
35 | 38 | } |
36 | 39 | } |
37 | 40 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | protected function getItem(string $name) { |
14 | 14 | |
15 | - $file_name = ($this->dir_name . $name . '/Config.json'); |
|
15 | + $file_name = ($this->dir_name.$name.'/Config.json'); |
|
16 | 16 | |
17 | 17 | if (null === ($data = JSON::load($file_name))) return null; |
18 | 18 |
@@ -14,11 +14,17 @@ |
||
14 | 14 | |
15 | 15 | $file_name = ($this->dir_name . $name . '/Config.json'); |
16 | 16 | |
17 | - if (null === ($data = JSON::load($file_name))) return null; |
|
17 | + if (null === ($data = JSON::load($file_name))) { |
|
18 | + return null; |
|
19 | + } |
|
18 | 20 | |
19 | - if (null === ($data = Schema::get(static::$schema_prototype)->validate($data))) return null; |
|
21 | + if (null === ($data = Schema::get(static::$schema_prototype)->validate($data))) { |
|
22 | + return null; |
|
23 | + } |
|
20 | 24 | |
21 | - if (!(static::$extension_class::valid($data['name']) && ($data['name'] === $name))) return null; |
|
25 | + if (!(static::$extension_class::valid($data['name']) && ($data['name'] === $name))) { |
|
26 | + return null; |
|
27 | + } |
|
22 | 28 | |
23 | 29 | # ------------------------ |
24 | 30 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | protected function handle() { |
14 | 14 | |
15 | - if (!Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/login'); |
|
15 | + if (!Auth::initial()) Request::redirect(INSTALL_PATH.'/admin/login'); |
|
16 | 16 | |
17 | 17 | return (new Auth\Action\Register)->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/login'); |
|
15 | + if (!Auth::initial()) { |
|
16 | + Request::redirect(INSTALL_PATH . '/admin/login'); |
|
17 | + } |
|
16 | 18 | |
17 | 19 | return (new Auth\Action\Register)->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 | } |
@@ -20,7 +20,9 @@ |
||
20 | 20 | |
21 | 21 | # Implement form |
22 | 22 | |
23 | - if (null !== $this->form) $this->form->implement($contents); |
|
23 | + if (null !== $this->form) { |
|
24 | + $this->form->implement($contents); |
|
25 | + } |
|
24 | 26 | |
25 | 27 | # ------------------------ |
26 | 28 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | if ($this->form->handle(new Auth\Controller\Reset())) { |
22 | 22 | |
23 | - Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/login?submitted=reset'); |
|
23 | + Request::redirect(INSTALL_PATH.(Auth::admin() ? '/admin' : '/profile').'/login?submitted=reset'); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | # ------------------------ |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | if ($this->form->handle(new Auth\Controller\Register())) { |
22 | 22 | |
23 | - Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/login?submitted=register'); |
|
23 | + Request::redirect(INSTALL_PATH.(Auth::admin() ? '/admin' : '/profile').'/login?submitted=register'); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | # ------------------------ |