@@ -38,15 +38,23 @@ discard block |
||
38 | 38 | |
39 | 39 | public function setValueFromDefault() |
40 | 40 | { |
41 | - if (isset($this->default['first'])) $this->value_first = $this->default['first']; |
|
42 | - if (isset($this->default['surname'])) $this->value_surname = $this->default['surname']; |
|
41 | + if (isset($this->default['first'])) { |
|
42 | + $this->value_first = $this->default['first']; |
|
43 | + } |
|
44 | + if (isset($this->default['surname'])) { |
|
45 | + $this->value_surname = $this->default['surname']; |
|
46 | + } |
|
43 | 47 | $this->value = trim($this->value_first.' '.$this->value_surname); |
44 | 48 | } |
45 | 49 | |
46 | 50 | public function setValueFromModel($model) |
47 | 51 | { |
48 | - if (property_exists($model, $this->name.'_first')) $this->value_first = $model->{$this->name.'_first'}; |
|
49 | - if (property_exists($model, $this->name.'_surname')) $this->value_surname = $model->{$this->name.'_surname'}; |
|
52 | + if (property_exists($model, $this->name.'_first')) { |
|
53 | + $this->value_first = $model->{$this->name.'_first'}; |
|
54 | + } |
|
55 | + if (property_exists($model, $this->name.'_surname')) { |
|
56 | + $this->value_surname = $model->{$this->name.'_surname'}; |
|
57 | + } |
|
50 | 58 | $this->value = trim($this->value_first.' '.$this->value_surname); |
51 | 59 | } |
52 | 60 | |
@@ -59,9 +67,15 @@ discard block |
||
59 | 67 | |
60 | 68 | public function fillModelWithValue($model) |
61 | 69 | { |
62 | - if (property_exists($model, $this->name.'_first')) $model->{$this->name.'_first'} = $this->value_first; |
|
63 | - if (property_exists($model, $this->name.'_surname')) $model->{$this->name.'_surname'} = $this->value_surname; |
|
64 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
70 | + if (property_exists($model, $this->name.'_first')) { |
|
71 | + $model->{$this->name.'_first'} = $this->value_first; |
|
72 | + } |
|
73 | + if (property_exists($model, $this->name.'_surname')) { |
|
74 | + $model->{$this->name.'_surname'} = $this->value_surname; |
|
75 | + } |
|
76 | + if (property_exists($model, $this->name)) { |
|
77 | + $model->{$this->name} = $this->value; |
|
78 | + } |
|
65 | 79 | } |
66 | 80 | |
67 | 81 | public function validateRequired() |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function setValueFromModel($model) |
43 | 43 | { |
44 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
44 | + if (property_exists($model, $this->name)) { |
|
45 | + $this->value = $model->{$this->name}; |
|
46 | + } |
|
45 | 47 | } |
46 | 48 | |
47 | 49 | public function setValueFromRequest($request) |
@@ -51,7 +53,9 @@ discard block |
||
51 | 53 | |
52 | 54 | public function fillModelWithValue($model) |
53 | 55 | { |
54 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
56 | + if (property_exists($model, $this->name)) { |
|
57 | + $model->{$this->name} = $this->value; |
|
58 | + } |
|
55 | 59 | } |
56 | 60 | |
57 | 61 | public function validateRequired() |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function setValueFromModel($model) |
43 | 43 | { |
44 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
44 | + if (property_exists($model, $this->name)) { |
|
45 | + $this->value = $model->{$this->name}; |
|
46 | + } |
|
45 | 47 | } |
46 | 48 | |
47 | 49 | public function setValueFromRequest($request) |
@@ -51,7 +53,9 @@ discard block |
||
51 | 53 | |
52 | 54 | public function fillModelWithValue($model) |
53 | 55 | { |
54 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
56 | + if (property_exists($model, $this->name)) { |
|
57 | + $model->{$this->name} = $this->value; |
|
58 | + } |
|
55 | 59 | } |
56 | 60 | |
57 | 61 | public function validateRequired() |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function setValueFromModel($model) |
43 | 43 | { |
44 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
44 | + if (property_exists($model, $this->name)) { |
|
45 | + $this->value = $model->{$this->name}; |
|
46 | + } |
|
45 | 47 | } |
46 | 48 | |
47 | 49 | public function setValueFromRequest($request) |
@@ -51,7 +53,9 @@ discard block |
||
51 | 53 | |
52 | 54 | public function fillModelWithValue($model) |
53 | 55 | { |
54 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
56 | + if (property_exists($model, $this->name)) { |
|
57 | + $model->{$this->name} = $this->value; |
|
58 | + } |
|
55 | 59 | } |
56 | 60 | |
57 | 61 | public function validateRequired() |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function setValueFromModel($model) |
43 | 43 | { |
44 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
44 | + if (property_exists($model, $this->name)) { |
|
45 | + $this->value = $model->{$this->name}; |
|
46 | + } |
|
45 | 47 | } |
46 | 48 | |
47 | 49 | public function setValueFromRequest($request) |
@@ -51,7 +53,9 @@ discard block |
||
51 | 53 | |
52 | 54 | public function fillModelWithValue($model) |
53 | 55 | { |
54 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
56 | + if (property_exists($model, $this->name)) { |
|
57 | + $model->{$this->name} = $this->value; |
|
58 | + } |
|
55 | 59 | } |
56 | 60 | |
57 | 61 | public function validateRequired() |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function setValueFromModel($model) |
43 | 43 | { |
44 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
44 | + if (property_exists($model, $this->name)) { |
|
45 | + $this->value = $model->{$this->name}; |
|
46 | + } |
|
45 | 47 | } |
46 | 48 | |
47 | 49 | public function setValueFromRequest($request) |
@@ -51,7 +53,9 @@ discard block |
||
51 | 53 | |
52 | 54 | public function fillModelWithValue($model) |
53 | 55 | { |
54 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
56 | + if (property_exists($model, $this->name)) { |
|
57 | + $model->{$this->name} = $this->value; |
|
58 | + } |
|
55 | 59 | } |
56 | 60 | |
57 | 61 | public function validateRequired() |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | public function setValueFromModel($model) |
43 | 43 | { |
44 | - if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
44 | + if (property_exists($model, $this->name)) { |
|
45 | + $this->value = $model->{$this->name}; |
|
46 | + } |
|
45 | 47 | } |
46 | 48 | |
47 | 49 | public function setValueFromRequest($request) |
@@ -51,7 +53,9 @@ discard block |
||
51 | 53 | |
52 | 54 | public function fillModelWithValue($model) |
53 | 55 | { |
54 | - if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
56 | + if (property_exists($model, $this->name)) { |
|
57 | + $model->{$this->name} = $this->value; |
|
58 | + } |
|
55 | 59 | } |
56 | 60 | |
57 | 61 | public function validateRequired() |