@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public static function registerRoutes(Router $router) |
27 | 27 | { |
28 | 28 | $routeName = 'admin.display.async'; |
29 | - if (! $router->has($routeName)) { |
|
29 | + if (!$router->has($routeName)) { |
|
30 | 30 | $router->get('{adminModel}/async/{adminDisplayName?}', [ |
31 | 31 | 'as' => $routeName, |
32 | 32 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\DisplayController@async', |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | $routeName = 'admin.display.async.inlineEdit'; |
37 | - if (! $router->has($routeName)) { |
|
37 | + if (!$router->has($routeName)) { |
|
38 | 38 | $router->post('{adminModel}/async/{adminDisplayName?}', [ |
39 | 39 | 'as' => $routeName, |
40 | 40 | 'uses' => 'SleepingOwl\Admin\Http\Controllers\AdminController@inlineEdit', |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $totalCount = $query->count(); |
204 | 204 | $filteredCount = 0; |
205 | 205 | |
206 | - if (! is_null($this->distinct)) { |
|
206 | + if (!is_null($this->distinct)) { |
|
207 | 207 | $filteredCount = $query->distinct()->count($this->getDistinct()); |
208 | 208 | } |
209 | 209 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | return; |
254 | 254 | } |
255 | 255 | |
256 | - $query->where(function (Builder $query) use ($search) { |
|
256 | + $query->where(function(Builder $query) use ($search) { |
|
257 | 257 | $columns = $this->getColumns()->all(); |
258 | 258 | |
259 | 259 | foreach ($columns as $column) { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | */ |
80 | 80 | public function getOptions() |
81 | 81 | { |
82 | - if (! is_null($this->getModelForOptions()) && ! is_null($this->getDisplay())) { |
|
82 | + if (!is_null($this->getModelForOptions()) && !is_null($this->getDisplay())) { |
|
83 | 83 | $this->setOptions( |
84 | 84 | $this->loadOptions() |
85 | 85 | ); |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | */ |
77 | 77 | protected function getFormatedDate($date) |
78 | 78 | { |
79 | - if (! is_null($date)) { |
|
80 | - if (! $date instanceof Carbon) { |
|
79 | + if (!is_null($date)) { |
|
80 | + if (!$date instanceof Carbon) { |
|
81 | 81 | $date = Carbon::parse($date); |
82 | 82 | } |
83 | 83 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | public function getValueFromModel() |
94 | 94 | { |
95 | 95 | $value = parent::getValueFromModel(); |
96 | - if (! empty($value)) { |
|
96 | + if (!empty($value)) { |
|
97 | 97 | return $this->parseValue($value); |
98 | 98 | } |
99 | 99 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function setModelAttribute($value) |
127 | 127 | { |
128 | - $value = ! empty($value) |
|
128 | + $value = !empty($value) |
|
129 | 129 | ? Carbon::createFromFormat($this->getPickerFormat(), $value, $this->getTimezone()) |
130 | 130 | ->timezone(config('app.timezone'))->format($this->getFormat()) |
131 | 131 | : null; |
@@ -70,7 +70,7 @@ |
||
70 | 70 | */ |
71 | 71 | public function getUrl() |
72 | 72 | { |
73 | - if (! $this->url) { |
|
73 | + if (!$this->url) { |
|
74 | 74 | return request()->url(); |
75 | 75 | } |
76 | 76 |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function setOrderable($orderable = true) |
77 | 77 | { |
78 | - if ($orderable !== false && ! $orderable instanceof OrderByClauseInterface) { |
|
79 | - if (! is_string($orderable) && ! $orderable instanceof Closure) { |
|
78 | + if ($orderable !== false && !$orderable instanceof OrderByClauseInterface) { |
|
79 | + if (!is_string($orderable) && !$orderable instanceof Closure) { |
|
80 | 80 | $orderable = $this->getName(); |
81 | 81 | } |
82 | 82 | } |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | if ($instance === null) { |
145 | 145 | $instance = collect(); |
146 | 146 | } |
147 | - } elseif (! is_null($instance)) { |
|
147 | + } elseif (!is_null($instance)) { |
|
148 | 148 | $instance = $instance->getAttribute($part); |
149 | 149 | } |
150 | 150 | |
151 | - if (! empty($parts) && ! is_null($instance)) { |
|
151 | + if (!empty($parts) && !is_null($instance)) { |
|
152 | 152 | return $this->getValueFromObject($instance, implode('.', $parts)); |
153 | 153 | } |
154 | 154 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $this->setModelForOptions($options); |
53 | 53 | } |
54 | 54 | |
55 | - if (! is_null($title)) { |
|
55 | + if (!is_null($title)) { |
|
56 | 56 | $this->setDisplay($title); |
57 | 57 | } |
58 | 58 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if ($this->multiple) { |
78 | 78 | $this->setHtmlAttribute('multiple', 'multiple'); |
79 | 79 | |
80 | - if (! in_array($this->operator, ['in', 'not_in'])) { |
|
80 | + if (!in_array($this->operator, ['in', 'not_in'])) { |
|
81 | 81 | $this->setOperator('in'); |
82 | 82 | } |
83 | 83 | } else { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function getOptions() |
123 | 123 | { |
124 | - if (! is_null($this->getModelForOptions()) && ! is_null($this->getDisplay())) { |
|
124 | + if (!is_null($this->getModelForOptions()) && !is_null($this->getDisplay())) { |
|
125 | 125 | $this->setOptions( |
126 | 126 | $this->loadOptions() |
127 | 127 | ); |
@@ -75,15 +75,15 @@ |
||
75 | 75 | { |
76 | 76 | $this->content = $content; |
77 | 77 | |
78 | - if (! is_null($label)) { |
|
78 | + if (!is_null($label)) { |
|
79 | 79 | $this->setLabel($label); |
80 | 80 | } |
81 | 81 | |
82 | - if (! is_null($icon)) { |
|
82 | + if (!is_null($icon)) { |
|
83 | 83 | $this->setIcon($icon); |
84 | 84 | } |
85 | 85 | |
86 | - if (! is_null($badge)) { |
|
86 | + if (!is_null($badge)) { |
|
87 | 87 | $this->setBadge($badge); |
88 | 88 | } |
89 | 89 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $name = $params[0]; |
36 | 36 | } |
37 | 37 | |
38 | - if (! $this->exists($name)) { |
|
38 | + if (!$this->exists($name)) { |
|
39 | 39 | return ''; |
40 | 40 | } |
41 | 41 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function renderIfExistsArray($name, $params = []) |
63 | 63 | { |
64 | - if (! $this->exists($name)) { |
|
64 | + if (!$this->exists($name)) { |
|
65 | 65 | return ''; |
66 | 66 | } |
67 | 67 |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | { |
25 | 25 | $aliases = $this->getValidAliases(); |
26 | 26 | |
27 | - $aliases = $aliases->filter(function (Alias $item) { |
|
28 | - return ! collect([ |
|
27 | + $aliases = $aliases->filter(function(Alias $item) { |
|
28 | + return !collect([ |
|
29 | 29 | 'MessageStack', |
30 | 30 | 'AdminSection', |
31 | 31 | 'AdminTemplate', |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ])->search($item->getAlias()); |
41 | 41 | }); |
42 | 42 | |
43 | - return $aliases->groupBy(function (Alias $alias) { |
|
43 | + return $aliases->groupBy(function(Alias $alias) { |
|
44 | 44 | return $alias->getExtendsNamespace(); |
45 | 45 | }); |
46 | 46 | } |