Passed
Push — hotfix/fix-counts ( fcb9e3...1543e7 )
by Paul
03:35
created
plugin/Database/OptionManager.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@  discard block
 block discarded – undo
42 42
 		$options = $this->all();
43 43
 		$pointer = &$options;
44 44
 		foreach( $keys as $key ) {
45
-			if( !isset( $pointer[$key] ) || !is_array( $pointer[$key] ))continue;
45
+			if( !isset( $pointer[$key] ) || !is_array( $pointer[$key] )) {
46
+				continue;
47
+			}
46 48
 			$pointer = &$pointer[$key];
47 49
 		}
48 50
 		unset( $pointer[$last] );
@@ -77,7 +79,9 @@  discard block
 block discarded – undo
77 79
 			glsr( DefaultsManager::class )->defaults()
78 80
 		);
79 81
 		array_walk( $options, function( &$value ) {
80
-			if( !is_string( $value ))return;
82
+			if( !is_string( $value )) {
83
+				return;
84
+			}
81 85
 			$value = wp_kses( $value, wp_kses_allowed_html( 'post' ));
82 86
 		});
83 87
 		return glsr( Helper::class )->convertDotNotationArray( $options );
Please login to merge, or discard this patch.
plugin/Modules/Html/Template.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
 		$arrayKeys = ['context', 'globals'];
54 54
 		$data = wp_parse_args( $data, array_fill_keys( $arrayKeys, [] ));
55 55
 		foreach( $arrayKeys as $key ) {
56
-			if( is_array( $data[$key] ))continue;
56
+			if( is_array( $data[$key] )) {
57
+				continue;
58
+			}
57 59
 			$data[$key] = [];
58 60
 		}
59 61
 		return $data;
Please login to merge, or discard this patch.
plugin/Handlers/EnqueueAdminAssets.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@  discard block
 block discarded – undo
36 36
 			[],
37 37
 			glsr()->version
38 38
 		);
39
-		if( !$this->isCurrentScreen() )return;
39
+		if( !$this->isCurrentScreen() ) {
40
+			return;
41
+		}
40 42
 		wp_enqueue_script(
41 43
 			Application::ID,
42 44
 			glsr()->url( 'assets/scripts/'.Application::ID.'-admin.js' ),
@@ -113,8 +115,12 @@  discard block
 block discarded – undo
113 115
 		$dismissedPointers = explode( ',', (string)$dismissedPointers );
114 116
 		$generatedPointers = [];
115 117
 		foreach( $pointers as $pointer ) {
116
-			if( $pointer['screen'] != glsr_current_screen()->id )continue;
117
-			if( in_array( $pointer['id'], $dismissedPointers ))continue;
118
+			if( $pointer['screen'] != glsr_current_screen()->id ) {
119
+				continue;
120
+			}
121
+			if( in_array( $pointer['id'], $dismissedPointers )) {
122
+				continue;
123
+			}
118 124
 			$generatedPointers[] = $this->generatePointer( $pointer );
119 125
 		}
120 126
 		$this->pointers = $generatedPointers;
@@ -140,7 +146,9 @@  discard block
 block discarded – undo
140 146
 	{
141 147
 		$variables = [];
142 148
 		foreach( glsr()->mceShortcodes as $tag => $args ) {
143
-			if( empty( $args['required'] ))continue;
149
+			if( empty( $args['required'] )) {
150
+				continue;
151
+			}
144 152
 			$variables[$tag] = $args['required'];
145 153
 		}
146 154
 		return $variables;
Please login to merge, or discard this patch.
autoload.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,13 @@
 block discarded – undo
15 15
 	];
16 16
 	foreach( $namespaces as $prefix => $baseDir ) {
17 17
 		$len = strlen( $prefix );
18
-		if( strncmp( $prefix, $className, $len ) !== 0 )continue;
18
+		if( strncmp( $prefix, $className, $len ) !== 0 ) {
19
+			continue;
20
+		}
19 21
 		$file = $baseDir.str_replace( '\\', '/', substr( $className, $len )).'.php';
20
-		if( !file_exists( $file ))continue;
22
+		if( !file_exists( $file )) {
23
+			continue;
24
+		}
21 25
 		require $file;
22 26
 		break;
23 27
 	}
Please login to merge, or discard this patch.
plugin/Modules/Html/Field.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function build()
45 45
 	{
46
-		if( !$this->field['is_valid'] )return;
46
+		if( !$this->field['is_valid'] ) {
47
+			return;
48
+		}
47 49
 		if( $this->field['is_raw'] ) {
48 50
 			return glsr( Builder::class )->{$this->field['type']}( $this->field );
49 51
 		}
@@ -143,7 +145,9 @@  discard block
 block discarded – undo
143 145
 	 */
144 146
 	protected function getFieldErrors()
145 147
 	{
146
-		if( empty( $this->field['errors'] ) || !is_array( $this->field['errors'] ))return;
148
+		if( empty( $this->field['errors'] ) || !is_array( $this->field['errors'] )) {
149
+			return;
150
+		}
147 151
 		$errors = array_reduce( $this->field['errors'], function( $carry, $error ) {
148 152
 			return $carry.glsr( Builder::class )->span( $error, ['class' => 'glsr-field-error'] );
149 153
 		});
@@ -170,7 +174,9 @@  discard block
 block discarded – undo
170 174
 			'name', 'type',
171 175
 		];
172 176
 		foreach( $requiredValues as $value ) {
173
-			if( isset( $this->field[$value] ))continue;
177
+			if( isset( $this->field[$value] )) {
178
+				continue;
179
+			}
174 180
 			$missingValues[] = $value;
175 181
 			$this->field['is_valid'] = false;
176 182
 		}
@@ -187,7 +193,9 @@  discard block
 block discarded – undo
187 193
 	 */
188 194
 	protected function normalize()
189 195
 	{
190
-		if( !$this->isFieldValid() )return;
196
+		if( !$this->isFieldValid() ) {
197
+			return;
198
+		}
191 199
 		$this->field['path'] = $this->field['name'];
192 200
 		$className = glsr( Helper::class )->buildClassName( $this->field['type'], __NAMESPACE__.'\Fields' );
193 201
 		if( class_exists( $className )) {
@@ -205,7 +213,9 @@  discard block
 block discarded – undo
205 213
 	 */
206 214
 	protected function normalizeFieldId()
207 215
 	{
208
-		if( isset( $this->field['id'] ) || $this->field['is_raw'] )return;
216
+		if( isset( $this->field['id'] ) || $this->field['is_raw'] ) {
217
+			return;
218
+		}
209 219
 		$this->field['id'] = glsr( Helper::class )->convertPathToId(
210 220
 			$this->field['path'],
211 221
 			$this->getFieldPrefix()
Please login to merge, or discard this patch.
plugin/Controllers/EditorController/Labels.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@
 block discarded – undo
48 48
 	public function filterUpdateMessages( array $messages )
49 49
 	{
50 50
 		$post = get_post();
51
-		if( !( $post instanceof WP_Post ))return;
51
+		if( !( $post instanceof WP_Post )) {
52
+			return;
53
+		}
52 54
 		$strings = $this->getReviewLabels();
53 55
 		$restored = filter_input( INPUT_GET, 'revision' );
54 56
 		if( $revisionTitle = wp_post_revision_title( intval( $restored ), false )) {
Please login to merge, or discard this patch.
plugin/Modules/Email.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,9 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	public function send()
74 74
 	{
75
-		if( !$this->message || !$this->subject || !$this->to )return;
75
+		if( !$this->message || !$this->subject || !$this->to ) {
76
+			return;
77
+		}
76 78
 		$sent = wp_mail(
77 79
 			$this->to,
78 80
 			$this->subject,
@@ -90,8 +92,12 @@  discard block
 block discarded – undo
90 92
 	 */
91 93
 	public function buildPlainTextMessage( PHPMailer $phpmailer )
92 94
 	{
93
-		if( empty( $this->email ))return;
94
-		if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody ))return;
95
+		if( empty( $this->email )) {
96
+			return;
97
+		}
98
+		if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody )) {
99
+			return;
100
+		}
95 101
 		$message = $this->stripHtmlTags( $phpmailer->Body );
96 102
 		$phpmailer->AltBody = apply_filters( 'site-reviews/email/message', $message, 'text', $this );
97 103
 	}
Please login to merge, or discard this patch.
plugin/Modules/Schema/BaseType.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -212,7 +212,9 @@  discard block
 block discarded – undo
212 212
 		$newParents = $parents;
213 213
 		foreach( $parents as $parent ) {
214 214
 			$parentClass = glsr( Helper::class )->buildClassName( $parent, __NAMESPACE__ );
215
-			if( !class_exists( $parentClass ))continue;
215
+			if( !class_exists( $parentClass )) {
216
+				continue;
217
+			}
216 218
 			$newParents = array_merge( $newParents, $this->getParents( (new $parentClass)->parents ));
217 219
 		}
218 220
 		return array_values( array_unique( $newParents ));
@@ -226,7 +228,9 @@  discard block
 block discarded – undo
226 228
 		$parents = $this->getParents();
227 229
 		foreach( $parents as $parent ) {
228 230
 			$parentClass = glsr( Helper::class )->buildClassName( $parent, __NAMESPACE__ );
229
-			if( !class_exists( $parentClass ))continue;
231
+			if( !class_exists( $parentClass )) {
232
+				continue;
233
+			}
230 234
 			$this->allowed = array_values( array_unique( array_merge( (new $parentClass)->allowed, $this->allowed )));
231 235
 		}
232 236
 	}
Please login to merge, or discard this patch.
plugin/Modules/System.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -91,7 +91,9 @@  discard block
 block discarded – undo
91 91
 			get_mu_plugins(),
92 92
 			get_plugins( '/../'.basename( WPMU_PLUGIN_DIR ))
93 93
 		);
94
-		if( empty( $plugins ))return;
94
+		if( empty( $plugins )) {
95
+			return;
96
+		}
95 97
 		return $this->normalizePluginList( $plugins );
96 98
 	}
97 99
 
@@ -100,7 +102,9 @@  discard block
 block discarded – undo
100 102
 	 */
101 103
 	public function getMultisitePluginDetails()
102 104
 	{
103
-		if( !is_multisite() || empty( get_site_option( 'active_sitewide_plugins', [] )))return;
105
+		if( !is_multisite() || empty( get_site_option( 'active_sitewide_plugins', [] ))) {
106
+			return;
107
+		}
104 108
 		return $this->normalizePluginList( wp_get_active_network_plugins() );
105 109
 	}
106 110
 
@@ -157,7 +161,9 @@  discard block
 block discarded – undo
157 161
 		ksort( $settings );
158 162
 		$details = [];
159 163
 		foreach( $settings as $key => $value ) {
160
-			if( $helper->startsWith( 'strings', $key ) && $helper->endsWith( 'id', $key ))continue;
164
+			if( $helper->startsWith( 'strings', $key ) && $helper->endsWith( 'id', $key )) {
165
+				continue;
166
+			}
161 167
 			$value = htmlspecialchars( trim( preg_replace('/\s\s+/', '\\n', $value )), ENT_QUOTES, 'UTF-8' );
162 168
 			$details[$key] = $value;
163 169
 		}
@@ -230,7 +236,9 @@  discard block
 block discarded – undo
230 236
 			'WPE_APIKEY' => 'WP Engine',
231 237
 		];
232 238
 		foreach( $checks as $key => $value ) {
233
-			if( !$this->isWebhostCheckValid( $key ))continue;
239
+			if( !$this->isWebhostCheckValid( $key )) {
240
+				continue;
241
+			}
234 242
 			return $value;
235 243
 		}
236 244
 		return implode( ',', array_filter( [DB_HOST, filter_input( INPUT_SERVER, 'SERVER_NAME' )] ));
@@ -311,7 +319,9 @@  discard block
 block discarded – undo
311 319
 		];
312 320
 		array_walk( $settings, function( &$value, $setting ) use( $keys ) {
313 321
 			foreach( $keys as $key ) {
314
-				if( !glsr( Helper::class )->startsWith( $key, $setting ) || empty( $value ))continue;
322
+				if( !glsr( Helper::class )->startsWith( $key, $setting ) || empty( $value )) {
323
+					continue;
324
+				}
315 325
 				$value = str_repeat( '•', 13 );
316 326
 				return;
317 327
 			}
Please login to merge, or discard this patch.