@@ -261,7 +261,9 @@ discard block |
||
| 261 | 261 | { |
| 262 | 262 | $result = []; |
| 263 | 263 | foreach( $array as $key => $value ) { |
| 264 | - if( !$value )continue; |
|
| 264 | + if( !$value ) { |
|
| 265 | + continue; |
|
| 266 | + } |
|
| 265 | 267 | $result[$key] = is_array( $value ) |
| 266 | 268 | ? $this->removeEmptyArrayValues( $value ) |
| 267 | 269 | : $value; |
@@ -274,7 +276,8 @@ discard block |
||
| 274 | 276 | * @param string $text |
| 275 | 277 | * @return string |
| 276 | 278 | */ |
| 277 | - public function removePrefix( $prefix, $text ) { |
|
| 279 | + public function removePrefix( $prefix, $text ) |
|
| 280 | + { |
|
| 278 | 281 | return 0 === strpos( $text, $prefix ) |
| 279 | 282 | ? substr( $text, strlen( $prefix )) |
| 280 | 283 | : $text; |
@@ -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()->path( $possibleView.'.php' )))continue; |
|
| 58 | + if( !file_exists( glsr()->path( $possibleView.'.php' ))) { |
|
| 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 | |