Passed
Push — master ( a42385...9b46a7 )
by Paul
04:14
created
plugin/Modules/Upgrader.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@  discard block
 block discarded – undo
20 20
 		$filenames = [];
21 21
 		$iterator = new DirectoryIterator( dirname( __FILE__ ).'/Upgrader' );
22 22
 		foreach( $iterator as $fileinfo ) {
23
-			if( !$fileinfo->isFile() )continue;
23
+			if( !$fileinfo->isFile() ) {
24
+				continue;
25
+			}
24 26
 			$filenames[] = $fileinfo->getFilename();
25 27
 		}
26 28
 		natsort( $filenames );
@@ -28,7 +30,9 @@  discard block
 block discarded – undo
28 30
 			$className = str_replace( '.php', '', $file );
29 31
 			$version = str_replace( ['Upgrade_', '_'], ['', '.'], $className );
30 32
 			$versionSuffix = preg_replace( '/[\d.]+(.+)?/', '${1}', glsr()->version ); // allow alpha/beta versions
31
-			if( version_compare( $this->currentVersion(), $version.$versionSuffix, '>=' ))return;
33
+			if( version_compare( $this->currentVersion(), $version.$versionSuffix, '>=' )) {
34
+				return;
35
+			}
32 36
 			glsr( 'Modules\\Upgrader\\'.$className );
33 37
 			glsr_log()->info( 'Completed Upgrade for v'.$version.$versionSuffix );
34 38
 		});
Please login to merge, or discard this patch.
plugin/Modules/Html/Attributes.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -203,7 +203,9 @@  discard block
 block discarded – undo
203 203
 				$key = $value;
204 204
 				$value = true;
205 205
 			}
206
-			if( !in_array( $key, static::BOOLEAN_ATTRIBUTES ))continue;
206
+			if( !in_array( $key, static::BOOLEAN_ATTRIBUTES )) {
207
+				continue;
208
+			}
207 209
 			$this->attributes[$key] = wp_validate_boolean( $value );
208 210
 		}
209 211
 	}
@@ -218,7 +220,9 @@  discard block
 block discarded – undo
218 220
 				$key = $value;
219 221
 				$value = '';
220 222
 			}
221
-			if( !glsr( Helper::class )->startsWith( 'data-', $key ))continue;
223
+			if( !glsr( Helper::class )->startsWith( 'data-', $key )) {
224
+				continue;
225
+			}
222 226
 			if( is_array( $value )) {
223 227
 				$value = json_encode( $value, JSON_HEX_APOS|JSON_NUMERIC_CHECK|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE );
224 228
 			}
@@ -232,7 +236,9 @@  discard block
 block discarded – undo
232 236
 	protected function normalizeStringAttributes()
233 237
 	{
234 238
 		foreach( $this->attributes as $key => $value ) {
235
-			if( !is_string( $value ))continue;
239
+			if( !is_string( $value )) {
240
+				continue;
241
+			}
236 242
 			$this->attributes[$key] = trim( $value );
237 243
 		}
238 244
 	}
@@ -243,7 +249,9 @@  discard block
 block discarded – undo
243 249
 	 */
244 250
 	protected function normalizeInputType( $method )
245 251
 	{
246
-		if( $method != 'input' )return;
252
+		if( $method != 'input' ) {
253
+			return;
254
+		}
247 255
 		$attributes = wp_parse_args( $this->attributes, ['type' => ''] );
248 256
 		if( !in_array( $attributes['type'], static::INPUT_TYPES )) {
249 257
 			$this->attributes['type'] = 'text';
Please login to merge, or discard this patch.
plugin/Modules/Upgrader/Upgrade_3_0_0.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,9 +74,13 @@  discard block
 block discarded – undo
74 74
 	{
75 75
 		$this->newSettings = $this->getNewSettings();
76 76
 		$this->oldSettings = $this->getOldSettings();
77
-		if( empty( $this->oldSettings ))return;
77
+		if( empty( $this->oldSettings )) {
78
+			return;
79
+		}
78 80
 		foreach( static::MAPPED_SETTINGS as $old => $new ) {
79
-			if( empty( $this->oldSettings[$old] ))continue;
81
+			if( empty( $this->oldSettings[$old] )) {
82
+				continue;
83
+			}
80 84
 			$this->newSettings[$new] = $this->oldSettings[$old];
81 85
 		}
82 86
 		$this->migrateNotificationSettings();
@@ -136,7 +140,9 @@  discard block
 block discarded – undo
136 140
 		];
137 141
 		$this->newSettings['settings.general.notifications'] = [];
138 142
 		foreach( $notifications as $old => $new ) {
139
-			if( $this->oldSettings['settings.general.notification'] != $old )continue;
143
+			if( $this->oldSettings['settings.general.notification'] != $old ) {
144
+				continue;
145
+			}
140 146
 			$this->newSettings['settings.general.notifications'][] = $new;
141 147
 		}
142 148
 	}
Please login to merge, or discard this patch.