Passed
Pull Request — master (#16)
by Anton
03:45
created
www/engine/System/Classes/Installer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
 
22 22
 			# Check installation
23 23
 
24
-			if (null !== ($data = Schema::get('System')->load())) Request::redirect(INSTALL_PATH . '/index.php');
24
+			if (null !== ($data = Schema::get('System')->load())) Request::redirect(INSTALL_PATH.'/index.php');
25 25
 
26 26
 			# Get handler class
27 27
 
28 28
 			$checked = (Install::checkRequirements() && Validate::boolean(Request::get('checked')));
29 29
 
30
-			$class = ('Modules\Install\Handler\\' . (!$checked ? 'Check' : 'Database'));
30
+			$class = ('Modules\Install\Handler\\'.(!$checked ? 'Check' : 'Database'));
31 31
 
32 32
 			# ------------------------
33 33
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 			# Check installation
23 23
 
24
-			if (null !== ($data = Schema::get('System')->load())) Request::redirect(INSTALL_PATH . '/index.php');
24
+			if (null !== ($data = Schema::get('System')->load())) {
25
+				Request::redirect(INSTALL_PATH . '/index.php');
26
+			}
25 27
 
26 28
 			# Get handler class
27 29
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Dispatcher.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 			# Check installation
23 23
 
24
-			if (null === ($data = Schema::get('System')->load())) Request::redirect(INSTALL_PATH . '/install.php');
24
+			if (null === ($data = Schema::get('System')->load())) Request::redirect(INSTALL_PATH.'/install.php');
25 25
 
26 26
 			# Connect to database
27 27
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 			# Check installation
23 23
 
24
-			if (null === ($data = Schema::get('System')->load())) Request::redirect(INSTALL_PATH . '/install.php');
24
+			if (null === ($data = Schema::get('System')->load())) {
25
+				Request::redirect(INSTALL_PATH . '/install.php');
26
+			}
25 27
 
26 28
 			# Connect to database
27 29
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Handler/Recover.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/register');
24
+			if (Auth::isInitial()) Request::redirect(INSTALL_PATH.'/admin/register');
25 25
 
26 26
 			return (new Auth\Action\Recover)->handle();
27 27
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/register');
24
+			if (Auth::isInitial()) {
25
+				Request::redirect(INSTALL_PATH . '/admin/register');
26
+			}
25 27
 
26 28
 			return (new Auth\Action\Recover)->handle();
27 29
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Handler/Reset.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/register');
24
+			if (Auth::isInitial()) Request::redirect(INSTALL_PATH.'/admin/register');
25 25
 
26 26
 			return (new Auth\Action\Reset)->handle();
27 27
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/register');
24
+			if (Auth::isInitial()) {
25
+				Request::redirect(INSTALL_PATH . '/admin/register');
26
+			}
25 27
 
26 28
 			return (new Auth\Action\Reset)->handle();
27 29
 		}
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
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/register');
24
+			if (Auth::isInitial()) Request::redirect(INSTALL_PATH.'/admin/register');
25 25
 
26 26
 			return (new Auth\Action\Login)->handle();
27 27
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/register');
24
+			if (Auth::isInitial()) {
25
+				Request::redirect(INSTALL_PATH . '/admin/register');
26
+			}
25 27
 
26 28
 			return (new Auth\Action\Login)->handle();
27 29
 		}
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
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (!Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/login');
24
+			if (!Auth::isInitial()) Request::redirect(INSTALL_PATH.'/admin/login');
25 25
 
26 26
 			return (new Auth\Action\Register)->handle();
27 27
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 
22 22
 		public function handle() : Template\Block {
23 23
 
24
-			if (!Auth::isInitial()) Request::redirect(INSTALL_PATH . '/admin/login');
24
+			if (!Auth::isInitial()) {
25
+				Request::redirect(INSTALL_PATH . '/admin/login');
26
+			}
25 27
 
26 28
 			return (new Auth\Action\Register)->handle();
27 29
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Action/Recover.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
 			if (false === ($result = Auth\Utils\Connector\Secret::authorize($code, $admin))) {
39 39
 
40
-				Request::redirect(INSTALL_PATH . ($admin ? '/admin' : '/profile') . '/reset');
40
+				Request::redirect(INSTALL_PATH.($admin ? '/admin' : '/profile').'/reset');
41 41
 			}
42 42
 
43 43
 			# Set recovery data
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Utils/Connector.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,19 +29,29 @@
 block discarded – undo
29 29
 
30 30
 			# Check code
31 31
 
32
-			if (false === ($code = Validate::authCode($code))) return false;
32
+			if (false === ($code = Validate::authCode($code))) {
33
+				return false;
34
+			}
33 35
 
34 36
 			# Get auth
35 37
 
36
-			if (!($auth = Entitizer::get(static::$type))->init($code, 'code')) return false;
38
+			if (!($auth = Entitizer::get(static::$type))->init($code, 'code')) {
39
+				return false;
40
+			}
37 41
 
38
-			if (($auth->ip !== REQUEST_CLIENT_IP) || ($auth->time < (REQUEST_TIME - static::$lifetime))) return false;
42
+			if (($auth->ip !== REQUEST_CLIENT_IP) || ($auth->time < (REQUEST_TIME - static::$lifetime))) {
43
+				return false;
44
+			}
39 45
 
40 46
 			# Get user
41 47
 
42
-			if (0 === ($user = Entitizer::get(TABLE_USERS, $auth->id))->id) return false;
48
+			if (0 === ($user = Entitizer::get(TABLE_USERS, $auth->id))->id) {
49
+				return false;
50
+			}
43 51
 
44
-			if ($user->rank < ($admin ? RANK_ADMINISTRATOR : RANK_USER)) return false;
52
+			if ($user->rank < ($admin ? RANK_ADMINISTRATOR : RANK_USER)) {
53
+				return false;
54
+			}
45 55
 
46 56
 			# ------------------------
47 57
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Utils/Action.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 		private function getContents() : Template\Block {
29 29
 
30
-			$contents = View::get((Auth::isAdmin() ? 'Blocks/Auth/' : 'Blocks/Profile/Auth/') . static::$view);
30
+			$contents = View::get((Auth::isAdmin() ? 'Blocks/Auth/' : 'Blocks/Profile/Auth/').static::$view);
31 31
 
32 32
 			# Set code
33 33
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 			if ($this->form->handle(new static::$controller_class($this->user))) {
58 58
 
59
-				Request::redirect(INSTALL_PATH . (Auth::isAdmin() ? '/admin' : '/profile') . static::$redirect);
59
+				Request::redirect(INSTALL_PATH.(Auth::isAdmin() ? '/admin' : '/profile').static::$redirect);
60 60
 			}
61 61
 
62 62
 			# Display success message
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,11 +31,15 @@  discard block
 block discarded – undo
31 31
 
32 32
 			# Set code
33 33
 
34
-			if (null !== $this->code) $contents->code = $this->code;
34
+			if (null !== $this->code) {
35
+				$contents->code = $this->code;
36
+			}
35 37
 
36 38
 			# Implement form
37 39
 
38
-			if (null !== $this->form) $this->form->implement($contents);
40
+			if (null !== $this->form) {
41
+				$this->form->implement($contents);
42
+			}
39 43
 
40 44
 			# ------------------------
41 45
 
@@ -61,10 +65,12 @@  discard block
 block discarded – undo
61 65
 
62 66
 			# Display success message
63 67
 
64
-			foreach (static::$messages as $key => $message) if (Request::get('submitted') === $key) {
68
+			foreach (static::$messages as $key => $message) {
69
+				if (Request::get('submitted') === $key) {
65 70
 
66 71
 				Messages::set('success', Language::get($message['text']), Language::get($message['title']));
67 72
 			}
73
+			}
68 74
 
69 75
 			# ------------------------
70 76
 
Please login to merge, or discard this patch.