@@ -84,14 +84,18 @@ discard block |
||
84 | 84 | public function setValueFromDefault() |
85 | 85 | { |
86 | 86 | foreach (array_keys($this->options) as $key) { |
87 | - if (isset($this->default[$key])) $this->values[$key] = $this->default[$key] ? true : false; |
|
87 | + if (isset($this->default[$key])) { |
|
88 | + $this->values[$key] = $this->default[$key] ? true : false; |
|
89 | + } |
|
88 | 90 | } |
89 | 91 | } |
90 | 92 | |
91 | 93 | public function setValueFromModel($model) |
92 | 94 | { |
93 | 95 | foreach (array_keys($this->options) as $key) { |
94 | - if (isset($model->{$this->name.'_'.$key})) $this->values[$key] = $model->{$this->name.'_'.$key} ? true : false; |
|
96 | + if (isset($model->{$this->name.'_'.$key})) { |
|
97 | + $this->values[$key] = $model->{$this->name.'_'.$key} ? true : false; |
|
98 | + } |
|
95 | 99 | } |
96 | 100 | |
97 | 101 | } |
@@ -115,7 +119,9 @@ discard block |
||
115 | 119 | $checked = false; |
116 | 120 | |
117 | 121 | foreach (array_keys($this->options) as $key) { |
118 | - if ($this->values[$key]) $checked = true; |
|
122 | + if ($this->values[$key]) { |
|
123 | + $checked = true; |
|
124 | + } |
|
119 | 125 | } |
120 | 126 | |
121 | 127 | return $checked; |