@@ -81,7 +81,9 @@ discard block |
||
| 81 | 81 | ]; |
| 82 | 82 | if( !isset( $properties[$property] ) |
| 83 | 83 | || empty( array_filter( [$value], $properties[$property] )) |
| 84 | - )return; |
|
| 84 | + ) { |
|
| 85 | + return; |
|
| 86 | + } |
|
| 85 | 87 | $this->$property = $value; |
| 86 | 88 | } |
| 87 | 89 | |
@@ -90,7 +92,9 @@ discard block |
||
| 90 | 92 | */ |
| 91 | 93 | public function getClosingTag() |
| 92 | 94 | { |
| 93 | - if( empty( $this->tag ))return; |
|
| 95 | + if( empty( $this->tag )) { |
|
| 96 | + return; |
|
| 97 | + } |
|
| 94 | 98 | return '</'.$this->tag.'>'; |
| 95 | 99 | } |
| 96 | 100 | |
@@ -99,7 +103,9 @@ discard block |
||
| 99 | 103 | */ |
| 100 | 104 | public function getOpeningTag() |
| 101 | 105 | { |
| 102 | - if( empty( $this->tag ))return; |
|
| 106 | + if( empty( $this->tag )) { |
|
| 107 | + return; |
|
| 108 | + } |
|
| 103 | 109 | $attributes = glsr( Attributes::class )->{$this->tag}( $this->args )->toString(); |
| 104 | 110 | return '<'.trim( $this->tag.' '.$attributes ).'>'; |
| 105 | 111 | } |
@@ -141,7 +147,9 @@ discard block |
||
| 141 | 147 | */ |
| 142 | 148 | protected function buildFieldDescription() |
| 143 | 149 | { |
| 144 | - if( empty( $this->args['description'] ))return; |
|
| 150 | + if( empty( $this->args['description'] )) { |
|
| 151 | + return; |
|
| 152 | + } |
|
| 145 | 153 | if( $this->args['is_widget'] ) { |
| 146 | 154 | return $this->small( $this->args['description'] ); |
| 147 | 155 | } |
@@ -207,7 +215,9 @@ discard block |
||
| 207 | 215 | */ |
| 208 | 216 | protected function buildFormLabel( array $customArgs = [] ) |
| 209 | 217 | { |
| 210 | - if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' )return; |
|
| 218 | + if( empty( $this->args['label'] ) || $this->args['type'] == 'hidden' ) { |
|
| 219 | + return; |
|
| 220 | + } |
|
| 211 | 221 | return $this->label( wp_parse_args( $customArgs, [ |
| 212 | 222 | 'for' => $this->args['id'], |
| 213 | 223 | 'is_public' => $this->args['is_public'], |
@@ -36,7 +36,9 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | $views = $this->generatePossibleViews( $view ); |
| 38 | 38 | foreach( $views as $possibleView ) { |
| 39 | - if( !file_exists( glsr()->path( 'views/'.$possibleView.'.php' )))continue; |
|
| 39 | + if( !file_exists( glsr()->path( 'views/'.$possibleView.'.php' ))) { |
|
| 40 | + continue; |
|
| 41 | + } |
|
| 40 | 42 | return $possibleView; |
| 41 | 43 | } |
| 42 | 44 | return $view; |
@@ -56,7 +58,9 @@ discard block |
||
| 56 | 58 | public function modifyField( Builder $instance ) |
| 57 | 59 | { |
| 58 | 60 | $styles = glsr()->config( 'styles/'.$this->style ); |
| 59 | - if( !$this->isPublicInstance( $instance ) || empty( $styles ))return; |
|
| 61 | + if( !$this->isPublicInstance( $instance ) || empty( $styles )) { |
|
| 62 | + return; |
|
| 63 | + } |
|
| 60 | 64 | call_user_func_array( [$this, 'customize'], [&$instance, $this->normalizeStyles( $styles )] ); |
| 61 | 65 | } |
| 62 | 66 | |