@@ -127,7 +127,9 @@ discard block |
||
| 127 | 127 | { |
| 128 | 128 | $component->init($this->_queryBuilder, $this->_columns); |
| 129 | 129 | $componentName = \str_replace(' ', '', Str::lower($name ?? \class_basename($component))); |
| 130 | - if ($this->componentExists($componentName)) throw new MultipleComponentAssertionException(); |
|
| 130 | + if ($this->componentExists($componentName)) { |
|
| 131 | + throw new MultipleComponentAssertionException(); |
|
| 132 | + } |
|
| 131 | 133 | $this->_components[$componentName] = $component; |
| 132 | 134 | |
| 133 | 135 | return $this; |
@@ -309,7 +311,9 @@ discard block |
||
| 309 | 311 | |
| 310 | 312 | public function __get($name) |
| 311 | 313 | { |
| 312 | - if (\array_key_exists($name, $this->_components)) return $this->_components[$name]; |
|
| 314 | + if (\array_key_exists($name, $this->_components)) { |
|
| 315 | + return $this->_components[$name]; |
|
| 316 | + } |
|
| 313 | 317 | |
| 314 | 318 | return $this->$name; |
| 315 | 319 | } |