Completed
Push — master ( e36b08...21e8d2 )
by Timo
15s
created
src/DataTablesServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,35 +44,35 @@
 block discarded – undo
44 44
 
45 45
     private function _registerDataTable(): void
46 46
     {
47
-        $this->app->bind('datatable', function () {
47
+        $this->app->bind('datatable', function() {
48 48
             return new DataTable();
49 49
         });
50 50
     }
51 51
 
52 52
     private function _registerSessionHelper(): void
53 53
     {
54
-        $this->app->singleton('session_helper', function () {
54
+        $this->app->singleton('session_helper', function() {
55 55
             return new SessionHelper();
56 56
         });
57 57
     }
58 58
 
59 59
     private function _registerUrlHelper(): void
60 60
     {
61
-        $this->app->singleton('url_helper', function () {
61
+        $this->app->singleton('url_helper', function() {
62 62
             return new UrlHelper();
63 63
         });
64 64
     }
65 65
 
66 66
     private function _registerTableRenderer(): void
67 67
     {
68
-        $this->app->singleton('table_renderer', function () {
68
+        $this->app->singleton('table_renderer', function() {
69 69
             return new TableRenderer();
70 70
         });
71 71
     }
72 72
 
73 73
     private function _setDataTableAlias(): void
74 74
     {
75
-        $this->app->booting(function () {
75
+        $this->app->booting(function() {
76 76
             AliasLoader::getInstance()->alias('DataTable', DataTableFacade::class);
77 77
         });
78 78
     }
Please login to merge, or discard this patch.
src/Models/DataTable.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @param string|null $name
136 136
      * @return $this|DataTable
137 137
      */
138
-    public function addComponent(DataComponent $component, ?string $name = null): DataTable
138
+    public function addComponent(DataComponent $component, ? string $name = null) : DataTable
139 139
     {
140 140
         $componentName = \str_replace(' ', '', Str::lower($name ?? \class_basename($component)));
141 141
         if ($this->componentExists($componentName)) throw new MultipleComponentAssertionException();
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         /** @var Column $column */
180 180
         $column = \array_first(
181 181
             $this->_columns,
182
-            function ($index, $column) use ($columnName) {
182
+            function($index, $column) use ($columnName) {
183 183
                 /** @var Column $column */
184 184
                 return $column->getName() === $columnName;
185 185
             }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         if (!empty($columns)) {
333 333
             $query->selectRaw(
334 334
                 \implode(',',
335
-                    \array_map(function ($column) {
335
+                    \array_map(function($column) {
336 336
                         return $column->getIdentifier();
337 337
                     }, $columns)
338 338
                 )
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     {
350 350
         return \array_filter(
351 351
             $this->_columns,
352
-            function ($column) {
352
+            function($column) {
353 353
                 return !$column->isMutated();
354 354
             }
355 355
         );
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     private function _fetchHeaders(): array
369 369
     {
370 370
         return \array_map(
371
-            function ($column) {
371
+            function($column) {
372 372
                 /** @var Column $column */
373 373
                 return new Header($column->getKey());
374 374
             },
Please login to merge, or discard this 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;
@@ -382,7 +384,9 @@  discard block
 block discarded – undo
382 384
      */
383 385
     public function __get($name)
384 386
     {
385
-        if (\array_key_exists($name, $this->_components)) return $this->_components[$name];
387
+        if (\array_key_exists($name, $this->_components)) {
388
+            return $this->_components[$name];
389
+        }
386 390
 
387 391
         return $this->$name;
388 392
     }
Please login to merge, or discard this patch.