Passed
Push — master ( c7e98d...e0d6a2 )
by Anton
04:56 queued 01:50
created
www/engine/System/Classes/Modules/Extend/Utils/Extension/Basic.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Extend/Utils/Loader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,17 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Handler/Register.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Handler/Login.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Utils/Action.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Utils/Mail.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 		private static function send(Entitizer\Entity\User $user, string $view, string $subject, string $link) {
12 12
 
13
-			$message = View::get((Auth::admin() ? 'Blocks/Auth/Mail/' : 'Blocks/Profile/Auth/Mail/') . $view);
13
+			$message = View::get((Auth::admin() ? 'Blocks/Auth/Mail/' : 'Blocks/Profile/Auth/Mail/').$view);
14 14
 
15 15
 			$message->name = $user->name; $message->link = $link; $message->copyright = Date::getYear();
16 16
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 			$to = $user->email; $sender = Settings::get('site_title'); $reply_to = Settings::get('system_email');
20 20
 
21
-			$from = ((false !== ($host = parse_url(Settings::get('system_url'), PHP_URL_HOST))) ? ('noreply@' . $host) : '');
21
+			$from = ((false !== ($host = parse_url(Settings::get('system_url'), PHP_URL_HOST))) ? ('noreply@'.$host) : '');
22 22
 
23 23
 			return Mailer::send($to, $sender, $from, $reply_to, $subject, $message->getContents(), true);
24 24
 		}
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 		public static function reset(Entitizer\Entity\User $user, string $code) {
29 29
 
30
-			$link = (Settings::get('system_url') . (Auth::admin() ? '/admin' : '/profile') . '/recover?code=' . $code);
30
+			$link = (Settings::get('system_url').(Auth::admin() ? '/admin' : '/profile').'/recover?code='.$code);
31 31
 
32 32
 			return self::send($user, 'Reset', Language::get('MAIL_SUBJECT_RESET'), $link);
33 33
 		}
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 		public static function register(Entitizer\Entity\User $user) {
38 38
 
39
-			$link = (Settings::get('system_url') . (Auth::admin() ? '/admin' : '/profile'));
39
+			$link = (Settings::get('system_url').(Auth::admin() ? '/admin' : '/profile'));
40 40
 
41 41
 			return self::send($user, 'Register', Language::get('MAIL_SUBJECT_REGISTER'), $link);
42 42
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Action/Reset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
 			# ------------------------
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Action/Register.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
 			# ------------------------
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Action/Recover.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 			if (false !== ($code = Auth::secret())) $this->code = $code;
18 18
 
19
-			else Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/reset');
19
+			else Request::redirect(INSTALL_PATH.(Auth::admin() ? '/admin' : '/profile').'/reset');
20 20
 
21 21
 			# Create form
22 22
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 			if ($this->form->handle(new Auth\Controller\Recover())) {
28 28
 
29
-				Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/login?submitted=recover');
29
+				Request::redirect(INSTALL_PATH.(Auth::admin() ? '/admin' : '/profile').'/login?submitted=recover');
30 30
 			}
31 31
 
32 32
 			# ------------------------
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,9 +14,11 @@
 block discarded – undo
14 14
 
15 15
 			# Init user by secret code
16 16
 
17
-			if (false !== ($code = Auth::secret())) $this->code = $code;
18
-
19
-			else Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/reset');
17
+			if (false !== ($code = Auth::secret())) {
18
+				$this->code = $code;
19
+			} else {
20
+				Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/reset');
21
+			}
20 22
 
21 23
 			# Create form
22 24
 
Please login to merge, or discard this patch.