Passed
Pull Request — master (#11)
by Anton
03:24
created
www/engine/Framework/Classes/Geo/Country.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 		public static function __autoload() {
14 14
 
15
-			self::init(DIR_DATA . 'Geo/Countries.php');
15
+			self::init(DIR_DATA.'Geo/Countries.php');
16 16
 		}
17 17
 	}
18 18
 }
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Geo/Timezone.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 		public static function __autoload() {
14 14
 
15
-			self::init(DIR_DATA . 'Geo/Timezones.php');
15
+			self::init(DIR_DATA.'Geo/Timezones.php');
16 16
 		}
17 17
 	}
18 18
 }
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Headers/Headers.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		public static function status(string $code) {
119 119
 
120
-			if (self::isStatusCode($code)) header(getenv('SERVER_PROTOCOL') . ' ' . self::$status_codes[$code]);
120
+			if (self::isStatusCode($code)) header(getenv('SERVER_PROTOCOL').' '.self::$status_codes[$code]);
121 121
 		}
122 122
 
123 123
 		# Send content header
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 
127 127
 			if (self::isContentTypeText($type)) {
128 128
 
129
-				return header('Content-type: ' . self::$content_types_text[$type] . '; charset=UTF-8');
129
+				return header('Content-type: '.self::$content_types_text[$type].'; charset=UTF-8');
130 130
 			}
131 131
 
132 132
 			if (self::isContentTypeMedia($type)) {
133 133
 
134
-				return header('Content-type: ' . self::$content_types_media[$type]);
134
+				return header('Content-type: '.self::$content_types_media[$type]);
135 135
 			}
136 136
 		}
137 137
 
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
 
144 144
 			if (!in_array($limiter, [CACHE_LIMITER_PRIVATE, CACHE_LIMITER_PUBLIC], true)) return;
145 145
 
146
-			header('Expires: ' . gmdate('D, d M Y H:i:s', (REQUEST_TIME + $expires)) . ' GMT');
146
+			header('Expires: '.gmdate('D, d M Y H:i:s', (REQUEST_TIME + $expires)).' GMT');
147 147
 
148
-			header('Last-Modified: ' . gmdate('D, d M Y H:i:s', REQUEST_TIME) . ' GMT');
148
+			header('Last-Modified: '.gmdate('D, d M Y H:i:s', REQUEST_TIME).' GMT');
149 149
 
150
-			header('Cache-Control: ' . $limiter . ', max-age=' . $expires . ', pre-check=' . $expires);
150
+			header('Cache-Control: '.$limiter.', max-age='.$expires.', pre-check='.$expires);
151 151
 
152
-			header('Pragma: ' . $limiter);
152
+			header('Pragma: '.$limiter);
153 153
 
154 154
 			# ------------------------
155 155
 
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
 
163 163
 			if (self::$cache_send) return;
164 164
 
165
-			header('Expires: ' . gmdate('D, d M Y H:i:s', strtotime('-1 day')) . ' GMT');
165
+			header('Expires: '.gmdate('D, d M Y H:i:s', strtotime('-1 day')).' GMT');
166 166
 
167
-			header('Last-Modified: ' . gmdate('D, d M Y H:i:s', strtotime('-1 day')) . ' GMT');
167
+			header('Last-Modified: '.gmdate('D, d M Y H:i:s', strtotime('-1 day')).' GMT');
168 168
 
169 169
 			header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
170 170
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,9 @@  discard block
 block discarded – undo
134 134
 
135 135
 		public static function sendStatus(int $code) {
136 136
 
137
-			if (self::isStatusCode($code)) header(getenv('SERVER_PROTOCOL') . ' ' . self::$status_codes[$code]);
137
+			if (self::isStatusCode($code)) {
138
+				header(getenv('SERVER_PROTOCOL') . ' ' . self::$status_codes[$code]);
139
+			}
138 140
 		}
139 141
 
140 142
 		/**
@@ -160,7 +162,9 @@  discard block
 block discarded – undo
160 162
 
161 163
 		public static function sendCache(int $expires, bool $public = false) {
162 164
 
163
-			if (self::$cache_sent) return;
165
+			if (self::$cache_sent) {
166
+				return;
167
+			}
164 168
 
165 169
 			header('Expires: ' . gmdate('D, d M Y H:i:s', (REQUEST_TIME + $expires)) . ' GMT');
166 170
 
@@ -183,7 +187,9 @@  discard block
 block discarded – undo
183 187
 
184 188
 		public static function sendNoCache() {
185 189
 
186
-			if (self::$cache_sent) return;
190
+			if (self::$cache_sent) {
191
+				return;
192
+			}
187 193
 
188 194
 			header('Expires: ' . gmdate('D, d M Y H:i:s', strtotime('-1 day')) . ' GMT');
189 195
 
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Request/Request.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
 		public static function redirect(string $url) {
47 47
 
48
-			header("Location: " . $url); exit();
48
+			header("Location: ".$url); exit();
49 49
 		}
50 50
 	}
51 51
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 		/**
57 57
 		 * Get a FILE-param value
58 58
 		 *
59
-		 * @return the array with file info or false if the param does not exist
59
+		 * @return string array with file info or false if the param does not exist
60 60
 		 */
61 61
 
62 62
 		public static function file(string $name) {
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Agent/Agent.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
 
24 24
 		public static function __autoload() {
25 25
 
26
-			$file_mobiles = (DIR_DATA . 'Agent/Mobiles.php');
26
+			$file_mobiles = (DIR_DATA.'Agent/Mobiles.php');
27 27
 
28
-			$file_robots = (DIR_DATA . 'Agent/Robots.php');
28
+			$file_robots = (DIR_DATA.'Agent/Robots.php');
29 29
 
30 30
 			if (is_array($mobiles = Explorer::php($file_mobiles))) self::$mobiles = $mobiles;
31 31
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,9 +21,13 @@  discard block
 block discarded – undo
21 21
 
22 22
 		private static function search(array &$list) {
23 23
 
24
-			if (empty($agent = getenv('HTTP_USER_AGENT'))) return false;
24
+			if (empty($agent = getenv('HTTP_USER_AGENT'))) {
25
+				return false;
26
+			}
25 27
 
26
-			foreach ($list as $item) if (false !== stripos($agent, $item)) return true;
28
+			foreach ($list as $item) {
29
+				if (false !== stripos($agent, $item)) return true;
30
+			}
27 31
 
28 32
 			# ------------------------
29 33
 
@@ -40,9 +44,13 @@  discard block
 block discarded – undo
40 44
 
41 45
 			$file_robots = (DIR_DATA . 'Agent/Robots.php');
42 46
 
43
-			if (is_array($mobiles = Explorer::include($file_mobiles))) self::$mobiles = $mobiles;
47
+			if (is_array($mobiles = Explorer::include($file_mobiles))) {
48
+				self::$mobiles = $mobiles;
49
+			}
44 50
 
45
-			if (is_array($robots = Explorer::include($file_robots))) self::$robots = $robots;
51
+			if (is_array($robots = Explorer::include($file_robots))) {
52
+				self::$robots = $robots;
53
+			}
46 54
 		}
47 55
 
48 56
 		/**
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Mailer/Mailer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
 
13 13
 			# Set headers
14 14
 
15
-			$headers  = ('MIME-Version: 1.0' . "\r\n");
15
+			$headers  = ('MIME-Version: 1.0'."\r\n");
16 16
 
17
-			$headers .= ('Content-Type: ' . ($is_html ? 'text/html' : 'text/plain') . '; charset=UTF-8' . "\r\n");
17
+			$headers .= ('Content-Type: '.($is_html ? 'text/html' : 'text/plain').'; charset=UTF-8'."\r\n");
18 18
 
19
-			$headers .= ('From: ' . $sender . ' <' . $from . '>' . "\r\n" . 'Reply-To: ' . $reply_to . "\r\n");
19
+			$headers .= ('From: '.$sender.' <'.$from.'>'."\r\n".'Reply-To: '.$reply_to."\r\n");
20 20
 
21
-			$headers .= ('X-Mailer: PHP/' . phpversion() . "\r\n");
21
+			$headers .= ('X-Mailer: PHP/'.phpversion()."\r\n");
22 22
 
23 23
 			# Send message
24 24
 
Please login to merge, or discard this patch.
www/engine/Framework/Classes/DB/Query/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
 			# Build query
20 20
 
21
-			$this->query = ('DELETE FROM ' . $table . ($condition ? (' WHERE (' .  $condition . ')') : ''));
21
+			$this->query = ('DELETE FROM '.$table.($condition ? (' WHERE ('.$condition.')') : ''));
22 22
 		}
23 23
 	}
24 24
 }
Please login to merge, or discard this patch.
www/engine/Framework/Classes/DB/Query/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
 
23 23
 			# Build query
24 24
 
25
-			$this->query = ('SELECT ' . $selection . ' FROM ' . $table . ($condition ? (' WHERE (' .  $condition . ')') : '') .
25
+			$this->query = ('SELECT '.$selection.' FROM '.$table.($condition ? (' WHERE ('.$condition.')') : '').
26 26
 
27
-				($order ? (' ORDER BY ' .  $order) : '') . ($limit ? (' LIMIT ' .  $limit) : ''));
27
+				($order ? (' ORDER BY '.$order) : '').($limit ? (' LIMIT '.$limit) : ''));
28 28
 		}
29 29
 	}
30 30
 }
Please login to merge, or discard this patch.
www/engine/System/Languages/uk-UA/Phrases/Admin.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 	'DASHBOARD_GROUP_GENERAL'                   => 'Основне',
64 64
 	'DASHBOARD_GROUP_DATABASE'                  => 'База даних',
65 65
 
66
-	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Інсталяційний файл <a href="$install_path$/install.php" target="_blank">install.php</a> ' .
66
+	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Інсталяційний файл <a href="$install_path$/install.php" target="_blank">install.php</a> '.
67 67
 	                                               'досі знаходиться в кореневій директорії сайта. Необхідно видалити його.',
68 68
 	'DASHBOARD_MESSAGE_CONFIG_FILE'             => 'Схоже, Ви поки не редагували конфігурацію сайта. '.
69 69
 	                                               'Перейдіть на <a href="$install_path$/admin/system/settings">сторінку налаштувань</a> для введення актуальних значень.',
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
 	'DASHBOARD_GROUP_DATABASE'                  => 'База даних',
66 66
 
67 67
 	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Інсталяційний файл <a href="$install_path$/install.php" target="_blank">install.php</a> ' .
68
-	                                               'досі знаходиться в кореневій директорії сайта. Необхідно видалити його.',
68
+												   'досі знаходиться в кореневій директорії сайта. Необхідно видалити його.',
69 69
 	'DASHBOARD_MESSAGE_SETTINGS_FILE'           => 'Схоже, Ви поки не редагували налаштування сайта. '.
70
-	                                               'Перейдіть на <a href="$install_path$/admin/system/settings">сторінку налаштувань</a> для введення актуальних даних.',
70
+												   'Перейдіть на <a href="$install_path$/admin/system/settings">сторінку налаштувань</a> для введення актуальних даних.',
71 71
 
72 72
 	# Pages
73 73
 
Please login to merge, or discard this patch.