Completed
Pull Request — master (#15)
by Andre
05:02
created
src/Models/DataTable.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,9 @@  discard block
 block discarded – undo
138 138
     public function addComponent(DataComponent $component, ?string $name = null): DataTable
139 139
     {
140 140
         $componentName = \str_replace(' ', '', Str::lower($name ?? \class_basename($component)));
141
-        if ($this->componentExists($componentName)) throw new MultipleComponentAssertionException();
141
+        if ($this->componentExists($componentName)) {
142
+            throw new MultipleComponentAssertionException();
143
+        }
142 144
         $this->_components[$componentName] = $component->init($this);
143 145
 
144 146
         return $this;
@@ -378,7 +380,9 @@  discard block
 block discarded – undo
378 380
 
379 381
     public function __get($name)
380 382
     {
381
-        if (\array_key_exists($name, $this->_components)) return $this->_components[$name];
383
+        if (\array_key_exists($name, $this->_components)) {
384
+            return $this->_components[$name];
385
+        }
382 386
 
383 387
         return $this->$name;
384 388
     }
Please login to merge, or discard this patch.