@@ -25,12 +25,16 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function setValuesFromDefaults($defaults) |
| 27 | 27 | { |
| 28 | - if (count($defaults)) $this->value = array_shift($defaults); |
|
| 28 | + if (count($defaults)) { |
|
| 29 | + $this->value = array_shift($defaults); |
|
| 30 | + } |
|
| 29 | 31 | } |
| 30 | 32 | |
| 31 | 33 | public function setValuesFromModel($model) |
| 32 | 34 | { |
| 33 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
| 35 | + if (property_exists($model, $this->name)) { |
|
| 36 | + $this->value = $model->{$this->name}; |
|
| 37 | + } |
|
| 34 | 38 | } |
| 35 | 39 | |
| 36 | 40 | public function setValuesFromRequest($request) |
@@ -40,7 +44,9 @@ discard block |
||
| 40 | 44 | |
| 41 | 45 | public function fillModelWithValues($model) |
| 42 | 46 | { |
| 43 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
| 47 | + if (property_exists($model, $this->name)) { |
|
| 48 | + $model->{$this->name} = $this->value; |
|
| 49 | + } |
|
| 44 | 50 | } |
| 45 | 51 | |
| 46 | 52 | public function validateRequired() |