Completed
Push — master ( 049abe...7733bc )
by Andrew
10s
created
app/classy/classy-config.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 	/**
13 13
 	 * Returns list of allowed variables that can be used in theme config
14 14
 	 * 
15
-	 * @return array
15
+	 * @return string[]
16 16
 	 */
17 17
 	private static function get_allowed_variables() {
18 18
 		
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@
 block discarded – undo
48 48
 
49 49
 					}
50 50
 				}
51
-			} else {
51
+			}
52
+			else {
52 53
 
53 54
 				die( 'There is no config file in ' . THEME . ' custom/config.php' );
54 55
 
Please login to merge, or discard this patch.
app/classy/classy.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,6 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * 
55 55
 	 * @param  string
56 56
 	 * @param  string
57
+	 * @param string $name
57 58
 	 */
58 59
 	private function define( $name, $value ) {
59 60
 		if ( !defined($name) ) {
@@ -241,7 +242,7 @@  discard block
 block discarded – undo
241 242
 
242 243
 	/**
243 244
 	 * @param array   $prefs
244
-	 * @return array mixed
245
+	 * @return stdClass mixed
245 246
 	 */
246 247
 	public static function get_pagination( $prefs = array() ) {
247 248
 		global $wp_query;
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -229,12 +229,14 @@  discard block
 block discarded – undo
229 229
 
230 230
 				$scope = array_merge( $common_scope, $data );
231 231
 
232
-			} else {
232
+			}
233
+			else {
233 234
 
234 235
 				$scope = $common_scope;
235 236
 
236 237
 			}
237
-		} else {
238
+		}
239
+		else {
238 240
 
239 241
 			$view = ClassyView::get_view();
240 242
 
@@ -283,11 +285,13 @@  discard block
 block discarded – undo
283 285
 
284 286
 					$_return[] = $post->id;
285 287
 
286
-				} elseif ( 'object' == $return ) {
288
+				}
289
+				elseif ( 'object' == $return ) {
287 290
 
288 291
 					$_return[] = $post;
289 292
 
290
-				} elseif ( class_exists( $return ) ) {
293
+				}
294
+				elseif ( class_exists( $return ) ) {
291 295
 
292 296
 					$_return[] = new $return( $post );
293 297
 
@@ -341,7 +345,8 @@  discard block
 block discarded – undo
341 345
 			$args['format'] = 'page/%#%';
342 346
 			$args['base'] = trailingslashit( $url[0] ).'%_%';
343 347
 
344
-		} else {
348
+		}
349
+		else {
345 350
 			$big = 999999999;
346 351
 			$args['base'] = str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) );
347 352
 		}
@@ -353,7 +358,8 @@  discard block
 block discarded – undo
353 358
 
354 359
 		if ( is_int( $prefs ) ) {
355 360
 			$args['mid_size'] = $prefs - 2;
356
-		} else {
361
+		}
362
+		else {
357 363
 			$args = array_merge( $args, $prefs );
358 364
 		}
359 365
 
Please login to merge, or discard this patch.
app/models/classy-user.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -61,6 +61,9 @@
 block discarded – undo
61 61
 		$this->init();
62 62
 	}
63 63
 
64
+	/**
65
+	 * @param integer|null $uid
66
+	 */
64 67
 	private function verify_id($uid) {
65 68
 		return $uid;
66 69
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
 		
44 44
 			wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/min/production.js', array( 'jquery' ), THEME_VERSION, true );
45 45
 		
46
-		} else {
46
+		}
47
+		else {
47 48
 			
48 49
 			wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/plugins.js', array( 'jquery' ), THEME_VERSION, true );
49 50
 
Please login to merge, or discard this patch.
app/appearance.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
 		
44 44
 			wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/min/production.js', array( 'jquery' ), THEME_VERSION, true );
45 45
 		
46
-		} else {
46
+		}
47
+		else {
47 48
 			
48 49
 			wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/plugins.js', array( 'jquery' ), THEME_VERSION, true );
49 50
 
Please login to merge, or discard this patch.
app/classy/classy-comment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	/**
63 63
 	 * Returns ClassyUser object of comment author
64 64
 	 * 
65
-	 * @return object ClassyUser
65
+	 * @return ClassyUser ClassyUser
66 66
 	 */
67 67
 	public function author() {
68 68
 		
Please login to merge, or discard this patch.
Braces   +20 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,7 +70,8 @@  discard block
 block discarded – undo
70 70
 
71 71
 			return new ClassyUser( $this->user_id );
72 72
 
73
-		} else {
73
+		}
74
+		else {
74 75
 
75 76
 			$author = new ClassyUser( 0 );
76 77
 
@@ -152,7 +153,8 @@  discard block
 block discarded – undo
152 153
 
153 154
 		if ( ! empty( $email ) ) {
154 155
 			$avatar = $this->get_avatar_url( $default, $host, $email_hash, $size );
155
-		} else {
156
+		}
157
+		else {
156 158
 			$avatar = $default;
157 159
 		}
158 160
 
@@ -172,7 +174,8 @@  discard block
 block discarded – undo
172 174
 
173 175
 		if ( $user ) {
174 176
 			$email = $user->user_email;
175
-		} else {
177
+		}
178
+		else {
176 179
 			$email = $this->comment_author_email;
177 180
 		}
178 181
 
@@ -199,7 +202,8 @@  discard block
 block discarded – undo
199 202
 			$avatar_default = get_option( 'avatar_default' );
200 203
 			if ( empty( $avatar_default ) ) {
201 204
 				$default = 'mystery';
202
-			} else {
205
+			}
206
+			else {
203 207
 				$default = $avatar_default;
204 208
 			}
205 209
 		}
@@ -207,13 +211,17 @@  discard block
 block discarded – undo
207 211
 		if ( 'mystery' == $default ) {
208 212
 			$default = $host . '/avatar/ad516503a11cd5ca435acc9bb6523536?s=' . $size;
209 213
 			// ad516503a11cd5ca435acc9bb6523536 == md5('[email protected]')
210
-		} else if ( 'blank' == $default ) {
214
+		}
215
+		else if ( 'blank' == $default ) {
211 216
 			$default = $email ? 'blank' : includes_url( 'images/blank.gif' );
212
-		} else if ( ! empty( $email ) && 'gravatar_default' == $default ) {
217
+		}
218
+		else if ( ! empty( $email ) && 'gravatar_default' == $default ) {
213 219
 			$default = '';
214
-		} else if ( 'gravatar_default' == $default ) {
220
+		}
221
+		else if ( 'gravatar_default' == $default ) {
215 222
 			$default = $host . '/avatar/?s=' . $size;
216
-		} else if ( empty( $email ) && ! strstr( $default, 'http://' ) ) {
223
+		}
224
+		else if ( empty( $email ) && ! strstr( $default, 'http://' ) ) {
217 225
 			$default = $host . '/avatar/?d=' . $default . '&s=' . $size;
218 226
 		}
219 227
 
@@ -231,10 +239,12 @@  discard block
 block discarded – undo
231 239
 
232 240
 		if ( is_ssl() ) {
233 241
 			$host = 'https://secure.gravatar.com';
234
-		} else {
242
+		}
243
+		else {
235 244
 			if ( ! empty( $email_hash ) ) {
236 245
 				$host = sprintf( 'http://%d.gravatar.com', (hexdec( $email_hash[0] ) % 2) );
237
-			} else {
246
+			}
247
+			else {
238 248
 				$host = 'http://0.gravatar.com';
239 249
 			}
240 250
 		}
Please login to merge, or discard this patch.
app/classy/classy-scope.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
 		
44 44
 			wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/min/production.js', array( 'jquery' ), THEME_VERSION, true );
45 45
 		
46
-		} else {
46
+		}
47
+		else {
47 48
 			
48 49
 			wp_register_script( 'theme_plugins', THEME_DIR . 'assets/js/plugins.js', array( 'jquery' ), THEME_VERSION, true );
49 50
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -43,6 +43,7 @@
 block discarded – undo
43 43
 	/**
44 44
 	 * Extends Scope with scope that is defined in theme_name/scope folder
45 45
 	 * 
46
+	 * @param string|false $view_name
46 47
 	 * @return array
47 48
 	 */
48 49
 	public static function extend_scope($scope, $view_name) {
Please login to merge, or discard this patch.
app/classy/classy-hierarchy.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * Checks if view exists
111 111
 	 *
112 112
 	 * @param  string $type view/scope
113
-	 * @param  string $view in blade path format, ex: layout/header
113
+	 * @param string|false $file
114 114
 	 * @return boolean true/false
115 115
 	 */
116 116
 	public static function file_exists( $type = 'view', $file ) {
@@ -129,7 +129,8 @@  discard block
 block discarded – undo
129 129
 	 *
130 130
 	 * @param  string $type view/scope
131 131
 	 * @param  string $type
132
-	 * @return array
132
+	 * @param string $page
133
+	 * @return string|false
133 134
 	 */
134 135
 	public static function get_available_file( $type = 'view', $page ) {
135 136
 
@@ -370,7 +371,7 @@  discard block
 block discarded – undo
370 371
 	/**
371 372
 	 * Returns classy template name or boolean if this is not classy template
372 373
 	 *
373
-	 * @return mixed
374
+	 * @return string|false
374 375
 	 */
375 376
 	public static function get_classy_template() {
376 377
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,9 +54,11 @@  discard block
 block discarded – undo
54 54
 
55 55
 		elseif ( is_paged() ) : return 'paged';
56 56
 
57
-		else :
57
+		else {
58
+			:
58 59
 
59 60
 			return 'index';
61
+		}
60 62
 
61 63
 		endif;
62 64
 
@@ -95,7 +97,8 @@  discard block
 block discarded – undo
95 97
 
96 98
 			return THEME_PATH . $folder . '/' . $view . '.blade.php';
97 99
 
98
-		} elseif ( 'scope' == $type ) {
100
+		}
101
+		elseif ( 'scope' == $type ) {
99 102
 
100 103
 			$folder = ClassyScope::$folder;
101 104
 
@@ -232,7 +235,8 @@  discard block
 block discarded – undo
232 235
 
233 236
 					list( $type, $subtype ) = explode( '/', $attachment->post_mime_type );
234 237
 
235
-				} else {
238
+				}
239
+				else {
236 240
 
237 241
 					list( $type, $subtype ) = array( $attachment->post_mime_type, '' );
238 242
 
@@ -343,9 +347,11 @@  discard block
 block discarded – undo
343 347
 
344 348
 			// Default
345 349
 
346
-		else :
350
+		else {
351
+			:
347 352
 
348 353
 			$views[] = $type;
354
+		}
349 355
 
350 356
 		endif;
351 357
 
Please login to merge, or discard this patch.
app/models/classy-post.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@  discard block
 block discarded – undo
77 77
 		if ( is_integer( $post ) ) {
78 78
 			$this->ID = $post;
79 79
 			$this->init();
80
-		} elseif ( is_a( $post, 'WP_Post' ) ) {
80
+		}
81
+		elseif ( is_a( $post, 'WP_Post' ) ) {
81 82
 			$this->import( $post );
82 83
 		}
83 84
 	}
@@ -259,7 +260,8 @@  discard block
 block discarded – undo
259 260
 			if ( $force ) {
260 261
 				$text = ClassyHelper::trim_words( $this->post_excerpt, $len, false );
261 262
 				$trimmed = true;
262
-			} else {
263
+			}
264
+			else {
263 265
 				$text = $this->post_excerpt;
264 266
 			}
265 267
 		}
@@ -318,7 +320,8 @@  discard block
 block discarded – undo
318 320
 
319 321
 			if ( $readmore && isset( $readmore_matches ) && ! empty( $readmore_matches[1] ) ) {
320 322
 				$text .= ' <a href="' . $this->get_permalink() . '" class="read-more">' . trim( $readmore_matches[1] ) . '</a>';
321
-			} elseif ( $readmore ) {
323
+			}
324
+			elseif ( $readmore ) {
322 325
 				$text .= ' <a href="' . $this->get_permalink() . '" class="read-more">' . trim( $readmore ) . '</a>';
323 326
 			}
324 327
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 	/**
187 187
 	 * Returns first attached image id
188 188
 	 *
189
-	 * @return int/boolean
189
+	 * @return integer|null
190 190
 	 */
191 191
 	public function get_first_attached_image_id() {
192 192
 
Please login to merge, or discard this patch.
app/classy/classy-query-helper.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,13 +16,15 @@
 block discarded – undo
16 16
 
17 17
 			return self::get_current_query();
18 18
 
19
-		} elseif ( is_array( $args ) ) {
19
+		}
20
+		elseif ( is_array( $args ) ) {
20 21
 
21 22
 			$args = array_merge( $default_args, $args );
22 23
 
23 24
 			return new WP_Query( $args );
24 25
 
25
-		} else {
26
+		}
27
+		else {
26 28
 
27 29
 			return new WP_Query( $default_args );
28 30
 
Please login to merge, or discard this patch.