Completed
Push — master ( 50ebea...f30043 )
by Andrew
02:27
created
app/classy/classy.php 1 patch
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -190,7 +190,9 @@  discard block
 block discarded – undo
190 190
 
191 191
 		$vars = ClassyConfig::get_vars();
192 192
 
193
-		if (isset($vars[$name])) return $vars[$name];
193
+		if (isset($vars[$name])) {
194
+			return $vars[$name];
195
+		}
194 196
 
195 197
 		return false;
196 198
 
@@ -230,13 +232,15 @@  discard block
 block discarded – undo
230 232
 
231 233
 				$scope = array_merge($common_scope, $data);
232 234
 
233
-			} else {
235
+			}
236
+			else {
234 237
 
235 238
 				$scope = $common_scope;
236 239
 
237 240
 			}
238 241
 
239
-		} else {
242
+		}
243
+		else {
240 244
 
241 245
 			$template = ClassyTemplate::get_template();
242 246
 
@@ -285,11 +289,13 @@  discard block
 block discarded – undo
285 289
 				
286 290
 					$_return[] = new ClassyPost($post_id);
287 291
 				
288
-				} elseif($return_type == 'object') {
292
+				}
293
+				elseif($return_type == 'object') {
289 294
 
290 295
 					$_return[] = get_post($post_id);
291 296
 
292
-				} else {
297
+				}
298
+				else {
293 299
 
294 300
 					$_return[] = $post_id;
295 301
 
@@ -344,7 +350,8 @@  discard block
 block discarded – undo
344 350
 			$args['format'] = 'page/%#%';
345 351
 			$args['base'] = trailingslashit( $url[0] ).'%_%';
346 352
 
347
-		} else {
353
+		}
354
+		else {
348 355
 			$big = 999999999;
349 356
 			$args['base'] = str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) );
350 357
 		}
@@ -356,7 +363,8 @@  discard block
 block discarded – undo
356 363
 		
357 364
 		if ( is_int( $prefs ) ) {
358 365
 			$args['mid_size'] = $prefs - 2;
359
-		} else {
366
+		}
367
+		else {
360 368
 			$args = array_merge( $args, $prefs );
361 369
 		}
362 370
 
Please login to merge, or discard this patch.
app/classy/classy-hierarchy.php 1 patch
Braces   +25 added lines, -13 removed lines patch added patch discarded remove patch
@@ -55,9 +55,11 @@  discard block
 block discarded – undo
55 55
 
56 56
 		elseif ( is_paged() ) : return 'paged';
57 57
 
58
-		else :
58
+		else {
59
+			:
59 60
 		
60 61
 			return 'index';
62
+		}
61 63
 
62 64
 		endif;
63 65
 
@@ -96,7 +98,8 @@  discard block
 block discarded – undo
96 98
 
97 99
 			return THEME_PATH . $folder . '/' . $template . '.blade.php';			
98 100
 		
99
-		} elseif ($type == 'scope') {
101
+		}
102
+		elseif ($type == 'scope') {
100 103
 
101 104
 			$folder = ClassyScope::$folder;
102 105
 
@@ -235,7 +238,8 @@  discard block
 block discarded – undo
235 238
 				
236 239
 					list( $type, $subtype ) = explode( '/', $attachment->post_mime_type );
237 240
 				
238
-				} else {
241
+				}
242
+				else {
239 243
 				
240 244
 					list( $type, $subtype ) = array( $attachment->post_mime_type, '' );
241 245
 				
@@ -332,16 +336,20 @@  discard block
 block discarded – undo
332 336
 			if ( ! $pagename && $id ) {
333 337
 				// If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object
334 338
 				$post = get_queried_object();
335
-				if ( $post )
336
-					$pagename = $post->post_name;
339
+				if ( $post ) {
340
+									$pagename = $post->post_name;
341
+				}
337 342
 			}
338 343
 
339
-			if ( $template && $template != 'index' )
340
-				$templates[] = $template;
341
-			if ( $pagename )
342
-				$templates[] = "page.$pagename";
343
-			if ( $id )
344
-				$templates[] = "page.$id";
344
+			if ( $template && $template != 'index' ) {
345
+							$templates[] = $template;
346
+			}
347
+			if ( $pagename ) {
348
+							$templates[] = "page.$pagename";
349
+			}
350
+			if ( $id ) {
351
+							$templates[] = "page.$id";
352
+			}
345 353
 
346 354
 			$templates[] = 'page.page';
347 355
 			
@@ -350,9 +358,11 @@  discard block
 block discarded – undo
350 358
 
351 359
 		// Default
352 360
 
353
-		else:
361
+		else {
362
+			:
354 363
 
355 364
 			$templates[] = $type;
365
+		}
356 366
 
357 367
 		endif;
358 368
 
@@ -385,7 +395,9 @@  discard block
 block discarded – undo
385 395
 
386 396
 		preg_match('/classy\-(.*)/', $template_slug, $matches);
387 397
 
388
-		if ( $matches && isset($matches[1]) ) return $matches[1];
398
+		if ( $matches && isset($matches[1]) ) {
399
+			return $matches[1];
400
+		}
389 401
 
390 402
 		return false;
391 403
 
Please login to merge, or discard this patch.
app/classy/classy-template.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,9 @@
 block discarded – undo
60 60
 			
61 61
 			if ( !empty($filename) ) {
62 62
 
63
-				if ( ! preg_match( '/\{\{\-\-\s*Template Name:(.*)\s*\-\-\}\}/mi', file_get_contents( $filename ), $header ) ) continue;
63
+				if ( ! preg_match( '/\{\{\-\-\s*Template Name:(.*)\s*\-\-\}\}/mi', file_get_contents( $filename ), $header ) ) {
64
+					continue;
65
+				}
64 66
 
65 67
 				$template_name = trim($header[1]);
66 68
 
Please login to merge, or discard this patch.