@@ -42,7 +42,9 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function build() |
| 44 | 44 | { |
| 45 | - if( !$this->field['is_valid'] )return; |
|
| 45 | + if( !$this->field['is_valid'] ) { |
|
| 46 | + return; |
|
| 47 | + } |
|
| 46 | 48 | if( $this->field['is_raw'] ) { |
| 47 | 49 | return glsr( Builder::class )->hidden( $this->field ); |
| 48 | 50 | } |
@@ -153,7 +155,9 @@ discard block |
||
| 153 | 155 | 'name', 'type', |
| 154 | 156 | ]; |
| 155 | 157 | foreach( $requiredValues as $value ) { |
| 156 | - if( isset( $this->field[$value] ))continue; |
|
| 158 | + if( isset( $this->field[$value] )) { |
|
| 159 | + continue; |
|
| 160 | + } |
|
| 157 | 161 | $missingValues[] = $value; |
| 158 | 162 | $this->field['is_valid'] = false; |
| 159 | 163 | } |
@@ -170,7 +174,9 @@ discard block |
||
| 170 | 174 | */ |
| 171 | 175 | protected function normalize() |
| 172 | 176 | { |
| 173 | - if( !$this->isFieldValid() )return; |
|
| 177 | + if( !$this->isFieldValid() ) { |
|
| 178 | + return; |
|
| 179 | + } |
|
| 174 | 180 | $this->field['path'] = $this->field['name']; |
| 175 | 181 | $className = glsr( Helper::class )->buildClassName( $this->field['type'], __NAMESPACE__.'\Fields' ); |
| 176 | 182 | if( class_exists( $className )) { |
@@ -188,7 +194,9 @@ discard block |
||
| 188 | 194 | */ |
| 189 | 195 | protected function normalizeFieldId() |
| 190 | 196 | { |
| 191 | - if( isset( $this->field['id'] ) || $this->field['is_raw'] )return; |
|
| 197 | + if( isset( $this->field['id'] ) || $this->field['is_raw'] ) { |
|
| 198 | + return; |
|
| 199 | + } |
|
| 192 | 200 | $this->field['id'] = glsr( Helper::class )->convertPathToId( |
| 193 | 201 | $this->field['path'], |
| 194 | 202 | $this->getFieldPrefix() |