@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function set($columnFilters) |
37 | 37 | { |
38 | - if (! is_array($columnFilters)) { |
|
38 | + if (!is_array($columnFilters)) { |
|
39 | 39 | $columnFilters = func_get_args(); |
40 | 40 | } |
41 | 41 | |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | |
174 | 174 | $display = $this->getDisplay(); |
175 | 175 | |
176 | - if (! $display->getExtensions()->has('columns')) { |
|
176 | + if (!$display->getExtensions()->has('columns')) { |
|
177 | 177 | return; |
178 | 178 | } |
179 | 179 | |
180 | 180 | $columns = $display->getColumns()->all(); |
181 | 181 | |
182 | - if (! is_int(key($search))) { |
|
182 | + if (!is_int(key($search))) { |
|
183 | 183 | $search = [$search]; |
184 | 184 | } |
185 | 185 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | protected function prepareView() |
218 | 218 | { |
219 | - if (! in_array($this->getPlacement(), ['table.footer', 'table.header']) && $this->view == 'display.extensions.columns_filters_table') { |
|
219 | + if (!in_array($this->getPlacement(), ['table.footer', 'table.header']) && $this->view == 'display.extensions.columns_filters_table') { |
|
220 | 220 | $this->view = 'display.extensions.columns_filters'; |
221 | 221 | $this->setHtmlAttribute('class', 'table table-default'); |
222 | 222 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function placable() |
17 | 17 | { |
18 | - return $this->filter(function (DisplayExtensionInterface $extension) { |
|
18 | + return $this->filter(function(DisplayExtensionInterface $extension) { |
|
19 | 19 | return $extension instanceof Placable; |
20 | 20 | }); |
21 | 21 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function renderable() |
44 | 44 | { |
45 | - return $this->filter(function (DisplayExtensionInterface $extension) { |
|
45 | + return $this->filter(function(DisplayExtensionInterface $extension) { |
|
46 | 46 | return $extension instanceof Renderable; |
47 | 47 | }); |
48 | 48 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function sortByOrder() |
54 | 54 | { |
55 | - return $this->sortBy(function (DisplayExtensionInterface $extension) { |
|
55 | + return $this->sortBy(function(DisplayExtensionInterface $extension) { |
|
56 | 56 | return $extension->getOrder(); |
57 | 57 | }); |
58 | 58 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function initialize() |
64 | 64 | { |
65 | - $this->each(function (DisplayExtensionInterface $extension) { |
|
65 | + $this->each(function(DisplayExtensionInterface $extension) { |
|
66 | 66 | if ($extension instanceof Initializable) { |
67 | 67 | $extension->initialize(); |
68 | 68 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function modifyQuery(\Illuminate\Database\Eloquent\Builder $query) |
78 | 78 | { |
79 | - $this->each(function (DisplayExtensionInterface $extension) use ($query) { |
|
79 | + $this->each(function(DisplayExtensionInterface $extension) use ($query) { |
|
80 | 80 | $extension->modifyQuery($query); |
81 | 81 | }); |
82 | 82 |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $class = get_class($class); |
122 | 122 | } |
123 | 123 | |
124 | - if (! $this->hasModel($class)) { |
|
124 | + if (!$this->hasModel($class)) { |
|
125 | 125 | $this->registerModel($class); |
126 | 126 | } |
127 | 127 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | parent::__construct($name, $title); |
23 | 23 | |
24 | - if (! is_null($callback)) { |
|
24 | + if (!is_null($callback)) { |
|
25 | 25 | $this->setCallback($callback); |
26 | 26 | } |
27 | 27 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function __construct($label = null, Closure $callback = null) |
33 | 33 | { |
34 | 34 | parent::__construct($label); |
35 | - if (! is_null($callback)) { |
|
35 | + if (!is_null($callback)) { |
|
36 | 36 | $this->setCallback($callback); |
37 | 37 | } |
38 | 38 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function getModelValue() |
68 | 68 | { |
69 | - if (! is_callable($callback = $this->getCallback())) { |
|
69 | + if (!is_callable($callback = $this->getCallback())) { |
|
70 | 70 | throw new \Exception('Invalid custom column callback'); |
71 | 71 | } |
72 | 72 |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $this->title, |
191 | 191 | ]; |
192 | 192 | |
193 | - $this->getExtensions()->each(function (DisplayExtensionInterface $extension) use (&$titles) { |
|
193 | + $this->getExtensions()->each(function(DisplayExtensionInterface $extension) use (&$titles) { |
|
194 | 194 | if (method_exists($extension, $method = 'getTitle')) { |
195 | 195 | $titles[] = call_user_func([$extension, $method]); |
196 | 196 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | foreach ($blocks as $block => $data) { |
240 | 240 | foreach ($data as $html) { |
241 | - if (! empty($html)) { |
|
241 | + if (!empty($html)) { |
|
242 | 242 | $view->getFactory()->startSection($block); |
243 | 243 | echo $html; |
244 | 244 | $view->getFactory()->yieldSection(); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | protected function makeRepository() |
288 | 288 | { |
289 | 289 | $repository = app($this->repositoryClass); |
290 | - if (! ($repository instanceof RepositoryInterface)) { |
|
290 | + if (!($repository instanceof RepositoryInterface)) { |
|
291 | 291 | throw new \Exception('Repository class must be instanced of [RepositoryInterface]'); |
292 | 292 | } |
293 | 293 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | if ($request->input($this->getPath().'_remove')) { |
44 | 44 | $this->setModelAttribute(null); |
45 | - } elseif (! is_null($value)) { |
|
45 | + } elseif (!is_null($value)) { |
|
46 | 46 | $this->setModelAttribute($value); |
47 | 47 | } |
48 | 48 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function storeAsJson() |
17 | 17 | { |
18 | - $this->mutateValue(function ($value) { |
|
18 | + $this->mutateValue(function($value) { |
|
19 | 19 | return json_encode($value); |
20 | 20 | }); |
21 | 21 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function storeAsComaSeparatedValue() |
31 | 31 | { |
32 | - $this->mutateValue(function ($value) { |
|
32 | + $this->mutateValue(function($value) { |
|
33 | 33 | return implode(',', $value); |
34 | 34 | }); |
35 | 35 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $name = $this->getName(); |
47 | 47 | $value = $request->input($name, ''); |
48 | 48 | |
49 | - if (! empty($value)) { |
|
49 | + if (!empty($value)) { |
|
50 | 50 | $value = explode(',', $value); |
51 | 51 | } else { |
52 | 52 | $value = []; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function getDefaultFrom() |
33 | 33 | { |
34 | - if (! $this->defaultFrom) { |
|
34 | + if (!$this->defaultFrom) { |
|
35 | 35 | $this->defaultFrom = Carbon::now(); |
36 | 36 | } |
37 | 37 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function getDefaultTo() |
59 | 59 | { |
60 | - if (! $this->defaultTo) { |
|
60 | + if (!$this->defaultTo) { |
|
61 | 61 | $this->defaultTo = Carbon::now(); |
62 | 62 | } |
63 | 63 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function setModelAttribute($value) |
87 | 87 | { |
88 | - $value = ! empty($value) ? array_map(function ($date) { |
|
88 | + $value = !empty($value) ? array_map(function($date) { |
|
89 | 89 | return Carbon::createFromFormat($this->getPickerFormat(), $date); |
90 | 90 | }, explode('::', $value)) : null; |
91 | 91 |