Completed
Push — master ( 50ebea...f30043 )
by Andrew
02:27
created
app/classy/classy-helper.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -247,58 +247,58 @@
 block discarded – undo
247 247
 
248 248
 		$textdomain = Classy::textdomain();
249 249
 
250
-	    $archives_title = '';
250
+		$archives_title = '';
251 251
 
252
-	    if ( is_category() ) {
252
+		if ( is_category() ) {
253 253
 
254
-	        $archives_title = single_cat_title( '', false );
254
+			$archives_title = single_cat_title( '', false );
255 255
 	    
256
-	    } else if ( is_tag() ) {
256
+		} else if ( is_tag() ) {
257 257
 
258
-	        $archives_title = 'Tag: ' . single_tag_title( '', false );
258
+			$archives_title = 'Tag: ' . single_tag_title( '', false );
259 259
 	    
260
-	    } else if ( is_author() ) {
260
+		} else if ( is_author() ) {
261 261
 
262
-	        if ( have_posts() ) {
262
+			if ( have_posts() ) {
263 263
 	        
264
-	            the_post();
265
-	            $archives_title = 'Author: ' . get_the_author();
264
+				the_post();
265
+				$archives_title = 'Author: ' . get_the_author();
266 266
 	        
267
-	        }
267
+			}
268 268
 	        
269
-	        rewind_posts();
269
+			rewind_posts();
270 270
 
271
-	    } else if ( is_search() ) {
271
+		} else if ( is_search() ) {
272 272
 
273
-	        $archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' );
273
+			$archives_title = sprintf( __( 'Search Results for: %s', $textdomain ), '<span>' . get_search_query() . '</span>' );
274 274
 	    
275
-	    } else if ( is_archive() ) {
275
+		} else if ( is_archive() ) {
276 276
 	        
277
-	        if ( is_day() ) {
277
+			if ( is_day() ) {
278 278
 	        
279
-	            $archives_title = get_the_date();
279
+				$archives_title = get_the_date();
280 280
 	        
281
-	        } elseif ( is_month() ) {
281
+			} elseif ( is_month() ) {
282 282
 	        
283
-	            $archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain ));
283
+				$archives_title = get_the_date( _x( 'F Y', 'monthly archives date format', $textdomain ));
284 284
 	        
285
-	        } elseif ( is_year() ) {
285
+			} elseif ( is_year() ) {
286 286
 	        
287
-	            $archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain ));
287
+				$archives_title = get_the_date( _x( 'Y', 'yearly archives date format', $textdomain ));
288 288
 	        
289
-	        } else {
289
+			} else {
290 290
 	        
291
-	            $archives_title = 'Archives';
291
+				$archives_title = 'Archives';
292 292
 	        
293
-	        }
293
+			}
294 294
 	    
295
-	    } else {
295
+		} else {
296 296
 	    
297
-	        $archives_title = 'Archives';
297
+			$archives_title = 'Archives';
298 298
 	    
299
-	    }
299
+		}
300 300
 
301
-	    return $archives_title;
301
+		return $archives_title;
302 302
 
303 303
 	}
304 304
 
Please login to merge, or discard this patch.
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 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
 		$templates = array();
56 56
 		
57
-	    $files = (array) glob( THEME_PATH . '/' . self::$folder . '/*/*.blade.php' );
57
+		$files = (array) glob( THEME_PATH . '/' . self::$folder . '/*/*.blade.php' );
58 58
 
59 59
 		foreach ( $files as $filename ) {
60 60
 			
Please login to merge, or discard this 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.