Completed
Pull Request — master (#2770)
by Arjay
22s
created
src/Processors/RowProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
      */
42 42
     public function rowValue($attribute, $template)
43 43
     {
44
-        if (! empty($template)) {
45
-            if (! is_callable($template) && Arr::get($this->data, $template)) {
44
+        if (!empty($template)) {
45
+            if (!is_callable($template) && Arr::get($this->data, $template)) {
46 46
                 $this->data[$attribute] = Arr::get($this->data, $template);
47 47
             } else {
48 48
                 $this->data[$attribute] = Helper::compileContent($template, $this->data, $this->row);
Please login to merge, or discard this patch.
src/helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('datatables')) {
3
+if (!function_exists('datatables')) {
4 4
     /**
5 5
      * Helper to make a new DataTable instance from source.
6 6
      * Or return the factory if source is not set.
Please login to merge, or discard this patch.
src/Processors/DataProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@
 block discarded – undo
263 263
     {
264 264
         $arrayDot = array_filter(Arr::dot($row));
265 265
         foreach ($arrayDot as $key => $value) {
266
-            if (! in_array($key, $this->rawColumns)) {
266
+            if (!in_array($key, $this->rawColumns)) {
267 267
                 $arrayDot[$key] = (is_string($value) || $value instanceof Htmlable) ? e($value) : $value;
268 268
             }
269 269
         }
Please login to merge, or discard this patch.
src/Utilities/Request.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function orderableColumns()
89 89
     {
90
-        if (! $this->isOrderable()) {
90
+        if (!$this->isOrderable()) {
91 91
             return [];
92 92
         }
93 93
 
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function isPaginationable(): bool
243 243
     {
244
-        return ! is_null($this->request->input('start')) &&
245
-            ! is_null($this->request->input('length')) &&
244
+        return !is_null($this->request->input('start')) &&
245
+            !is_null($this->request->input('length')) &&
246 246
             $this->request->input('length') != -1;
247 247
     }
248 248
 
Please login to merge, or discard this patch.
src/Utilities/Helper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         ob_start() && extract($data, EXTR_SKIP);
94
-        eval('?>'.app('blade.compiler')->compileString($str));
94
+        eval('?>' . app('blade.compiler')->compileString($str));
95 95
         $str = ob_get_contents();
96 96
         ob_end_clean();
97 97
 
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
      */
154 154
     public static function getOrMethod($method)
155 155
     {
156
-        if (! Str::contains(Str::lower($method), 'or')) {
157
-            return 'or'.ucfirst($method);
156
+        if (!Str::contains(Str::lower($method), 'or')) {
157
+            return 'or' . ucfirst($method);
158 158
         }
159 159
 
160 160
         return $method;
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
         if (count($chars) > 0) {
319 319
             foreach ($chars as $char) {
320
-                $wild .= $char.$wildcard;
320
+                $wild .= $char . $wildcard;
321 321
             }
322 322
         }
323 323
 
Please login to merge, or discard this patch.
src/DataTables.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             }
79 79
         }
80 80
 
81
-        throw new Exception('No available engine for '.get_class($source));
81
+        throw new Exception('No available engine for ' . get_class($source));
82 82
     }
83 83
 
84 84
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function getHtmlBuilder()
147 147
     {
148
-        if (! class_exists('\Yajra\DataTables\Html\Builder')) {
148
+        if (!class_exists('\Yajra\DataTables\Html\Builder')) {
149 149
             throw new Exception('Please install yajra/laravel-datatables-html to be able to use this function.');
150 150
         }
151 151
 
Please login to merge, or discard this patch.
src/DataTablesServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
         foreach ($engines as $engine => $class) {
46 46
             $engine = Str::camel($engine);
47 47
 
48
-            if (! method_exists(DataTables::class, $engine) && ! DataTables::hasMacro($engine)) {
48
+            if (!method_exists(DataTables::class, $engine) && !DataTables::hasMacro($engine)) {
49 49
                 DataTables::macro($engine, function () use ($class) {
50 50
                     $canCreate = [$class, 'canCreate'];
51
-                    if (is_callable($canCreate) && ! call_user_func_array($canCreate, func_get_args())) {
51
+                    if (is_callable($canCreate) && !call_user_func_array($canCreate, func_get_args())) {
52 52
                         throw new \InvalidArgumentException();
53 53
                     }
54 54
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function setupAssets()
70 70
     {
71
-        $this->mergeConfigFrom($config = __DIR__.'/config/datatables.php', 'datatables');
71
+        $this->mergeConfigFrom($config = __DIR__ . '/config/datatables.php', 'datatables');
72 72
 
73 73
         if ($this->app->runningInConsole()) {
74 74
             $this->publishes([$config => config_path('datatables.php')], 'datatables');
Please login to merge, or discard this patch.
src/DataTableAbstract.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
 
191 191
         if ($formatter instanceof Formatter) {
192 192
             foreach ((array) $columns as $column) {
193
-                $this->addColumn($column.'_formatted', $formatter);
193
+                $this->addColumn($column . '_formatted', $formatter);
194 194
             }
195 195
 
196 196
             return $this;
197 197
         }
198 198
 
199
-        throw new Exception('$formatter must be an instance of '.Formatter::class);
199
+        throw new Exception('$formatter must be an instance of ' . Formatter::class);
200 200
     }
201 201
 
202 202
     /**
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
      */
586 586
     public function pushToBlacklist($column): self
587 587
     {
588
-        if (! $this->isBlacklisted($column)) {
588
+        if (!$this->isBlacklisted($column)) {
589 589
             $this->columnDef['blacklist'][] = $column;
590 590
         }
591 591
 
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
      */
797 797
     protected function paginate(): void
798 798
     {
799
-        if ($this->request->isPaginationable() && ! $this->skipPaging) {
799
+        if ($this->request->isPaginationable() && !$this->skipPaging) {
800 800
             $this->paging();
801 801
         }
802 802
     }
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
         $error = $this->config->get('datatables.error');
910 910
         $debug = $this->config->get('app.debug');
911 911
 
912
-        if ($error === 'throw' || (! $error && ! $debug)) {
912
+        if ($error === 'throw' || (!$error && !$debug)) {
913 913
             throw $exception;
914 914
         }
915 915
 
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
             'recordsTotal' => $this->totalRecords,
921 921
             'recordsFiltered' => 0,
922 922
             'data' => [],
923
-            'error' => $error ? __($error) : "Exception Message:\n\n".$exception->getMessage(),
923
+            'error' => $error ? __($error) : "Exception Message:\n\n" . $exception->getMessage(),
924 924
         ]);
925 925
     }
926 926
 
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
     protected function setupKeyword(string $value): string
959 959
     {
960 960
         if ($this->config->isSmartSearch()) {
961
-            $keyword = '%'.$value.'%';
961
+            $keyword = '%' . $value . '%';
962 962
             if ($this->config->isWildcard()) {
963 963
                 $keyword = Helper::wildcardLikeString($value);
964 964
             }
Please login to merge, or discard this patch.
src/lumen.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('config_path')) {
3
+if (!function_exists('config_path')) {
4 4
     /**
5 5
      * Get the configuration path.
6 6
      *
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
      */
10 10
     function config_path($path = '')
11 11
     {
12
-        return app()->basePath().'/config'.($path ? '/'.$path : $path);
12
+        return app()->basePath() . '/config' . ($path ? '/' . $path : $path);
13 13
     }
14 14
 }
15 15
 
16
-if (! function_exists('public_path')) {
16
+if (!function_exists('public_path')) {
17 17
     /**
18 18
      * Return the path to public dir.
19 19
      *
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
      */
23 23
     function public_path($path = null)
24 24
     {
25
-        return rtrim(app()->basePath('public/'.$path), '/');
25
+        return rtrim(app()->basePath('public/' . $path), '/');
26 26
     }
27 27
 }
Please login to merge, or discard this patch.