@@ -55,7 +55,9 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | $views = $this->generatePossibleViews( $view ); |
| 57 | 57 | foreach( $views as $possibleView ) { |
| 58 | - if( !file_exists( glsr()->file( $possibleView )))continue; |
|
| 58 | + if( !file_exists( glsr()->file( $possibleView ))) { |
|
| 59 | + continue; |
|
| 60 | + } |
|
| 59 | 61 | return glsr( Helper::class )->removePrefix( 'views/', $possibleView ); |
| 60 | 62 | } |
| 61 | 63 | return $view; |
@@ -88,7 +90,9 @@ discard block |
||
| 88 | 90 | */ |
| 89 | 91 | public function modifyField( Builder $instance ) |
| 90 | 92 | { |
| 91 | - if( !$this->isPublicInstance( $instance ) || empty( array_filter( $this->fields )))return; |
|
| 93 | + if( !$this->isPublicInstance( $instance ) || empty( array_filter( $this->fields ))) { |
|
| 94 | + return; |
|
| 95 | + } |
|
| 92 | 96 | call_user_func_array( [$this, 'customize'], [$instance] ); |
| 93 | 97 | } |
| 94 | 98 | |
@@ -105,7 +109,9 @@ discard block |
||
| 105 | 109 | */ |
| 106 | 110 | protected function customize( Builder $instance ) |
| 107 | 111 | { |
| 108 | - if( !array_key_exists( $instance->tag, $this->fields ))return; |
|
| 112 | + if( !array_key_exists( $instance->tag, $this->fields )) { |
|
| 113 | + return; |
|
| 114 | + } |
|
| 109 | 115 | $args = wp_parse_args( $instance->args, array_fill_keys( ['class', 'type'], '' )); |
| 110 | 116 | $key = $instance->tag.'_'.$args['type']; |
| 111 | 117 | $classes = glsr_get( $this->fields, $key, glsr_get( $this->fields, $instance->tag )); |