@@ -43,7 +43,9 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function build() |
45 | 45 | { |
46 | - if( !$this->field['is_valid'] )return; |
|
46 | + if( !$this->field['is_valid'] ) { |
|
47 | + return; |
|
48 | + } |
|
47 | 49 | if( $this->field['is_raw'] ) { |
48 | 50 | return glsr( Builder::class )->hidden( $this->field ); |
49 | 51 | } |
@@ -154,7 +156,9 @@ discard block |
||
154 | 156 | 'name', 'type', |
155 | 157 | ]; |
156 | 158 | foreach( $requiredValues as $value ) { |
157 | - if( isset( $this->field[$value] ))continue; |
|
159 | + if( isset( $this->field[$value] )) { |
|
160 | + continue; |
|
161 | + } |
|
158 | 162 | $missingValues[] = $value; |
159 | 163 | $this->field['is_valid'] = false; |
160 | 164 | } |
@@ -171,7 +175,9 @@ discard block |
||
171 | 175 | */ |
172 | 176 | protected function normalize() |
173 | 177 | { |
174 | - if( !$this->isFieldValid() )return; |
|
178 | + if( !$this->isFieldValid() ) { |
|
179 | + return; |
|
180 | + } |
|
175 | 181 | $this->field['path'] = $this->field['name']; |
176 | 182 | $className = glsr( Helper::class )->buildClassName( $this->field['type'], __NAMESPACE__.'\Fields' ); |
177 | 183 | if( class_exists( $className )) { |
@@ -190,7 +196,9 @@ discard block |
||
190 | 196 | */ |
191 | 197 | protected function normalizeId() |
192 | 198 | { |
193 | - if( isset( $this->field['id'] ) || $this->field['is_raw'] )return; |
|
199 | + if( isset( $this->field['id'] ) || $this->field['is_raw'] ) { |
|
200 | + return; |
|
201 | + } |
|
194 | 202 | $this->field['id'] = glsr( Helper::class )->convertPathToId( |
195 | 203 | $this->field['path'], |
196 | 204 | $this->getFieldPrefix() |
@@ -214,7 +222,9 @@ discard block |
||
214 | 222 | */ |
215 | 223 | protected function determineIfMulti() |
216 | 224 | { |
217 | - if( !in_array( $this->field['type'], static::MULTI_FIELD_TYPES ))return; |
|
225 | + if( !in_array( $this->field['type'], static::MULTI_FIELD_TYPES )) { |
|
226 | + return; |
|
227 | + } |
|
218 | 228 | $this->field['is_multi'] = true; |
219 | 229 | } |
220 | 230 | } |