Test Setup Failed
Push — master ( c5be4a...39e959 )
by Anton
02:54
created
www/engine/System/Classes/Modules/Install/Utils/Tables.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 
94 94
 			for ($id = 2; $id <= 4; $id++) $pages[] = ['id' => $id, 'visibility' => VISIBILITY_PUBLISHED,
95 95
 
96
-				'locked' => false, 'slug' => ('page-' . ($id - 1)), 'name' => ('page-' . ($id - 1)),
96
+				'locked' => false, 'slug' => ('page-'.($id - 1)), 'name' => ('page-'.($id - 1)),
97 97
 
98
-				'title' => (Language::get('INSTALL_PAGE_DEMO_TITLE') . ' ' . ($id - 1)),
98
+				'title' => (Language::get('INSTALL_PAGE_DEMO_TITLE').' '.($id - 1)),
99 99
 
100 100
 				'contents' => Template::createBlock(Language::get('INSTALL_PAGE_DEMO_CONTENTS'))->getContents(),
101 101
 
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 
133 133
 			for ($id = 1; $id <= 3; $id++) $menu[] = [
134 134
 
135
-				'id' => $id, 'active' => true, 'position' => ($id - 1), 'slug' => ('page-' . $id),
135
+				'id' => $id, 'active' => true, 'position' => ($id - 1), 'slug' => ('page-'.$id),
136 136
 
137
-				'text' => (Language::get('INSTALL_PAGE_DEMO_TITLE') . ' ' . $id)];
137
+				'text' => (Language::get('INSTALL_PAGE_DEMO_TITLE').' '.$id)];
138 138
 
139 139
 			# Process insertion
140 140
 
Please login to merge, or discard this patch.
Braces   +28 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,7 +77,11 @@  discard block
 block discarded – undo
77 77
 
78 78
 			$count = DB::count(TABLE_PAGES);
79 79
 
80
-			if (false === $count) return false; else if ($count > 0) return true;
80
+			if (false === $count) {
81
+				return false;
82
+			} else if ($count > 0) {
83
+				return true;
84
+			}
81 85
 
82 86
 			# Process dataset
83 87
 
@@ -91,7 +95,8 @@  discard block
 block discarded – undo
91 95
 
92 96
 				'time_created' => REQUEST_TIME, 'time_modified' => REQUEST_TIME]];
93 97
 
94
-			for ($id = 2; $id <= 4; $id++) $pages[] = ['id' => $id, 'visibility' => VISIBILITY_PUBLISHED,
98
+			for ($id = 2; $id <= 4; $id++) {
99
+				$pages[] = ['id' => $id, 'visibility' => VISIBILITY_PUBLISHED,
95 100
 
96 101
 				'locked' => false, 'slug' => ('page-' . ($id - 1)), 'name' => ('page-' . ($id - 1)),
97 102
 
@@ -100,10 +105,13 @@  discard block
 block discarded – undo
100 105
 				'contents' => Template::createBlock(Language::get('INSTALL_PAGE_DEMO_CONTENTS'))->getContents(),
101 106
 
102 107
 				'time_created' => REQUEST_TIME, 'time_modified' => REQUEST_TIME];
108
+			}
103 109
 
104 110
 			# Process insertion
105 111
 
106
-			if (!(DB::insert(TABLE_PAGES, $pages, true) && DB::getLast()->status)) return false;
112
+			if (!(DB::insert(TABLE_PAGES, $pages, true) && DB::getLast()->status)) {
113
+				return false;
114
+			}
107 115
 
108 116
 			self::fillRelationsTable(TABLE_PAGES_RELATIONS, count($pages));
109 117
 
@@ -124,21 +132,29 @@  discard block
 block discarded – undo
124 132
 
125 133
 			$count = DB::count(TABLE_MENU);
126 134
 
127
-			if (false === $count) return false; else if ($count > 0) return true;
135
+			if (false === $count) {
136
+				return false;
137
+			} else if ($count > 0) {
138
+				return true;
139
+			}
128 140
 
129 141
 			# Process dataset
130 142
 
131 143
 			$menu = [];
132 144
 
133
-			for ($id = 1; $id <= 3; $id++) $menu[] = [
145
+			for ($id = 1; $id <= 3; $id++) {
146
+				$menu[] = [
134 147
 
135 148
 				'id' => $id, 'active' => true, 'position' => ($id - 1), 'slug' => ('page-' . $id),
136 149
 
137 150
 				'text' => (Language::get('INSTALL_PAGE_DEMO_TITLE') . ' ' . $id)];
151
+			}
138 152
 
139 153
 			# Process insertion
140 154
 
141
-			if (!(DB::insert(TABLE_MENU, $menu, true) && DB::getLast()->status)) return false;
155
+			if (!(DB::insert(TABLE_MENU, $menu, true) && DB::getLast()->status)) {
156
+				return false;
157
+			}
142 158
 
143 159
 			self::fillRelationsTable(TABLE_MENU_RELATIONS, count($menu));
144 160
 
@@ -157,7 +173,9 @@  discard block
 block discarded – undo
157 173
 
158 174
 			$definitions = self::getDefinitions(false);
159 175
 
160
-			foreach ($definitions as $definition) if (!$definition->createTables()) return false;
176
+			foreach ($definitions as $definition) {
177
+				if (!$definition->createTables()) return false;
178
+			}
161 179
 
162 180
 			# ------------------------
163 181
 
@@ -174,7 +192,9 @@  discard block
 block discarded – undo
174 192
 
175 193
 			$definitions = self::getDefinitions(true);
176 194
 
177
-			foreach ($definitions as $definition) if (!$definition->removeTables()) return false;
195
+			foreach ($definitions as $definition) {
196
+				if (!$definition->removeTables()) return false;
197
+			}
178 198
 
179 199
 			# ------------------------
180 200
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Install/Install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 
93 93
 		public static function checkFile() : bool {
94 94
 
95
-			return Explorer::isFile(DIR_WWW . 'install.php');
95
+			return Explorer::isFile(DIR_WWW.'install.php');
96 96
 		}
97 97
 	}
98 98
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Settings/Settings.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 
22 22
 		public static function __autoload() {
23 23
 
24
-			if (null === self::$settings) self::$settings = new Settings\Utils\Dataset;
24
+			if (null === self::$settings) {
25
+				self::$settings = new Settings\Utils\Dataset;
26
+			}
25 27
 		}
26 28
 
27 29
 		/**
@@ -32,7 +34,9 @@  discard block
 block discarded – undo
32 34
 
33 35
 		public static function load() : bool {
34 36
 
35
-			if (null === ($data = Schema::get('Settings')->load())) return false;
37
+			if (null === ($data = Schema::get('Settings')->load())) {
38
+				return false;
39
+			}
36 40
 
37 41
 			self::$settings->setArray($data); self::$loaded = true;
38 42
 
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.