Completed
Branch feature-direct_component_acces... (d14e40)
by Timo
03:34
created
src/Models/DataTable.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.