@@ -239,7 +239,9 @@ discard block |
||
| 239 | 239 | { |
| 240 | 240 | return function (Model $model = null, $locale = null) { |
| 241 | 241 | |
| 242 | - if(!$model) return $this->value; |
|
| 242 | + if(!$model) { |
|
| 243 | + return $this->value; |
|
| 244 | + } |
|
| 243 | 245 | |
| 244 | 246 | if ($locale && $this->isLocalized()) { |
| 245 | 247 | return $model->getTranslationFor($this->getColumn(), $locale); |
@@ -394,7 +396,9 @@ discard block |
||
| 394 | 396 | |
| 395 | 397 | public function getElementView(): string |
| 396 | 398 | { |
| 397 | - if($this->elementView) return $this->elementView; |
|
| 399 | + if($this->elementView) { |
|
| 400 | + return $this->elementView; |
|
| 401 | + } |
|
| 398 | 402 | |
| 399 | 403 | return $this->isLocalized() |
| 400 | 404 | ? 'chief::back._fields.translatable' |
@@ -75,7 +75,9 @@ |
||
| 75 | 75 | |
| 76 | 76 | private function replaceDotsByBrackets(string $value): string |
| 77 | 77 | { |
| 78 | - if(false === strpos($value, '.')) return $value; |
|
| 78 | + if(false === strpos($value, '.')) { |
|
| 79 | + return $value; |
|
| 80 | + } |
|
| 79 | 81 | |
| 80 | 82 | $value = str_replace('.', '][', $value) . ']'; |
| 81 | 83 | |