@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * Checks if view exists |
| 112 | 112 | * |
| 113 | 113 | * @param string $type view/scope |
| 114 | - * @param string $view in blade path format, ex: layout/header |
|
| 114 | + * @param string|false $file |
|
| 115 | 115 | * @return boolean true/false |
| 116 | 116 | */ |
| 117 | 117 | public static function file_exists($type = 'view', $file) { |
@@ -129,8 +129,9 @@ discard block |
||
| 129 | 129 | * Returns view name for render, based on type of request |
| 130 | 130 | * |
| 131 | 131 | * @param string $type view/scope |
| 132 | - * @param string $type |
|
| 133 | - * @return array |
|
| 132 | + * @param string $type |
|
| 133 | + * @param string $page |
|
| 134 | + * @return string|false |
|
| 134 | 135 | */ |
| 135 | 136 | public static function get_available_file($type = 'view', $page) { |
| 136 | 137 | |
@@ -378,7 +379,7 @@ discard block |
||
| 378 | 379 | /** |
| 379 | 380 | * Returns classy template name or boolean if this is not classy template |
| 380 | 381 | * |
| 381 | - * @return mixed |
|
| 382 | + * @return string|false |
|
| 382 | 383 | */ |
| 383 | 384 | public static function get_classy_template() { |
| 384 | 385 | |
@@ -55,9 +55,11 @@ discard block |
||
| 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 |
||
| 96 | 98 | |
| 97 | 99 | return THEME_PATH . $folder . '/' . $view . '.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 |
||
| 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 | |
@@ -351,9 +355,11 @@ discard block |
||
| 351 | 355 | |
| 352 | 356 | // Default |
| 353 | 357 | |
| 354 | - else: |
|
| 358 | + else { |
|
| 359 | + : |
|
| 355 | 360 | |
| 356 | 361 | $views[] = $type; |
| 362 | + } |
|
| 357 | 363 | |
| 358 | 364 | endif; |
| 359 | 365 | |
@@ -386,7 +392,9 @@ discard block |
||
| 386 | 392 | |
| 387 | 393 | preg_match('/classy\-(.*)/', $template_slug, $matches); |
| 388 | 394 | |
| 389 | - if ( $matches && isset($matches[1]) ) return $matches[1]; |
|
| 395 | + if ( $matches && isset($matches[1]) ) { |
|
| 396 | + return $matches[1]; |
|
| 397 | + } |
|
| 390 | 398 | |
| 391 | 399 | return false; |
| 392 | 400 | |
@@ -43,6 +43,7 @@ |
||
| 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) { |