@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | $redirectTo = admin_base_path(config('admin.auth.redirect_to', 'auth/login')); |
21 | 21 | |
22 | - if (Admin::guard()->guest() && ! $this->shouldPassThrough($request)) { |
|
22 | + if (Admin::guard()->guest() && !$this->shouldPassThrough($request)) { |
|
23 | 23 | return redirect()->guest($redirectTo); |
24 | 24 | } |
25 | 25 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | return collect($excepts) |
44 | 44 | ->map('admin_base_path') |
45 | - ->contains(function ($except) use ($request) { |
|
45 | + ->contains(function($except) use ($request) { |
|
46 | 46 | if ($except !== '/') { |
47 | 47 | $except = trim($except, '/'); |
48 | 48 | } |
@@ -135,7 +135,7 @@ |
||
135 | 135 | */ |
136 | 136 | public function getOptions() |
137 | 137 | { |
138 | - if (! isset($this->options['positionClass'])) { |
|
138 | + if (!isset($this->options['positionClass'])) { |
|
139 | 139 | $this->bottomRight(); |
140 | 140 | } |
141 | 141 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | public function retrieveModel(Request $request) |
39 | 39 | { |
40 | - if (! $key = $request->get('_key')) { |
|
40 | + if (!$key = $request->get('_key')) { |
|
41 | 41 | return false; |
42 | 42 | } |
43 | 43 |
@@ -338,11 +338,11 @@ discard block |
||
338 | 338 | |
339 | 339 | /** @var Field $field */ |
340 | 340 | foreach ($this->fields as $field) { |
341 | - if (! $validator = $field->getValidator($request->all())) { |
|
341 | + if (!$validator = $field->getValidator($request->all())) { |
|
342 | 342 | continue; |
343 | 343 | } |
344 | 344 | |
345 | - if (($validator instanceof Validator) && ! $validator->passes()) { |
|
345 | + if (($validator instanceof Validator) && !$validator->passes()) { |
|
346 | 346 | $failedValidators[] = $validator; |
347 | 347 | } |
348 | 348 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | public function getModalId() |
409 | 409 | { |
410 | - if (! $this->modalId) { |
|
410 | + if (!$this->modalId) { |
|
411 | 411 | if ($this->action instanceof RowAction) { |
412 | 412 | $this->modalId = uniqid('row-action-modal-').mt_rand(1000, 9999); |
413 | 413 | } else { |
@@ -115,11 +115,11 @@ discard block |
||
115 | 115 | { |
116 | 116 | static::ignoreMinify($css, $minify); |
117 | 117 | |
118 | - if (! is_null($css)) { |
|
118 | + if (!is_null($css)) { |
|
119 | 119 | return self::$css = array_merge(self::$css, (array) $css); |
120 | 120 | } |
121 | 121 | |
122 | - if (! $css = static::getMinifiedCss()) { |
|
122 | + if (!$css = static::getMinifiedCss()) { |
|
123 | 123 | $css = array_merge(static::$css, static::baseCss()); |
124 | 124 | } |
125 | 125 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | static::ignoreMinify($css, $minify); |
140 | 140 | |
141 | - if (! is_null($css)) { |
|
141 | + if (!is_null($css)) { |
|
142 | 142 | return static::$baseCss = $css; |
143 | 143 | } |
144 | 144 | |
@@ -161,11 +161,11 @@ discard block |
||
161 | 161 | { |
162 | 162 | static::ignoreMinify($js, $minify); |
163 | 163 | |
164 | - if (! is_null($js)) { |
|
164 | + if (!is_null($js)) { |
|
165 | 165 | return self::$js = array_merge(self::$js, (array) $js); |
166 | 166 | } |
167 | 167 | |
168 | - if (! $js = static::getMinifiedJs()) { |
|
168 | + if (!$js = static::getMinifiedJs()) { |
|
169 | 169 | $js = array_merge(static::baseJs(), static::$js); |
170 | 170 | } |
171 | 171 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | public static function headerJs($js = null) |
185 | 185 | { |
186 | - if (! is_null($js)) { |
|
186 | + if (!is_null($js)) { |
|
187 | 187 | return self::$headerJs = array_merge(self::$headerJs, (array) $js); |
188 | 188 | } |
189 | 189 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | { |
201 | 201 | static::ignoreMinify($js, $minify); |
202 | 202 | |
203 | - if (! is_null($js)) { |
|
203 | + if (!is_null($js)) { |
|
204 | 204 | return static::$baseJs = $js; |
205 | 205 | } |
206 | 206 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public static function ignoreMinify($assets, $ignore = true) |
215 | 215 | { |
216 | - if (! $ignore) { |
|
216 | + if (!$ignore) { |
|
217 | 217 | static::$minifyIgnores[] = $assets; |
218 | 218 | } |
219 | 219 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public static function script($script = '', $deferred = false) |
228 | 228 | { |
229 | - if (! empty($script)) { |
|
229 | + if (!empty($script)) { |
|
230 | 230 | if ($deferred) { |
231 | 231 | return self::$deferredScript = array_merge(self::$deferredScript, (array) $script); |
232 | 232 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | */ |
247 | 247 | public static function style($style = '') |
248 | 248 | { |
249 | - if (! empty($style)) { |
|
249 | + if (!empty($style)) { |
|
250 | 250 | return self::$style = array_merge(self::$style, (array) $style); |
251 | 251 | } |
252 | 252 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | */ |
261 | 261 | public static function html($html = '') |
262 | 262 | { |
263 | - if (! empty($html)) { |
|
263 | + if (!empty($html)) { |
|
264 | 264 | return self::$html = array_merge(self::$html, (array) $html); |
265 | 265 | } |
266 | 266 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | protected static function getManifestData($key) |
276 | 276 | { |
277 | - if (! empty(static::$manifestData)) { |
|
277 | + if (!empty(static::$manifestData)) { |
|
278 | 278 | return static::$manifestData[$key]; |
279 | 279 | } |
280 | 280 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | protected static function getMinifiedCss() |
293 | 293 | { |
294 | - if (! config('admin.minify_assets') || ! file_exists(public_path(static::$manifest))) { |
|
294 | + if (!config('admin.minify_assets') || !file_exists(public_path(static::$manifest))) { |
|
295 | 295 | return false; |
296 | 296 | } |
297 | 297 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | */ |
304 | 304 | protected static function getMinifiedJs() |
305 | 305 | { |
306 | - if (! config('admin.minify_assets') || ! file_exists(public_path(static::$manifest))) { |
|
306 | + if (!config('admin.minify_assets') || !file_exists(public_path(static::$manifest))) { |
|
307 | 307 | return false; |
308 | 308 | } |
309 | 309 |
@@ -103,7 +103,7 @@ |
||
103 | 103 | ) { |
104 | 104 | $model = $this->model->{$this->name}; |
105 | 105 | |
106 | - if (! $model instanceof Model) { |
|
106 | + if (!$model instanceof Model) { |
|
107 | 107 | $model = $relation->getRelated(); |
108 | 108 | } |
109 | 109 |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function menu() |
165 | 165 | { |
166 | - if (! empty($this->menu)) { |
|
166 | + if (!empty($this->menu)) { |
|
167 | 167 | return $this->menu; |
168 | 168 | } |
169 | 169 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $links = []; |
190 | 190 | |
191 | 191 | foreach ($menu as $item) { |
192 | - if (! empty($item['children'])) { |
|
192 | + if (!empty($item['children'])) { |
|
193 | 193 | $links = array_merge($links, $this->menuLinks($item['children'])); |
194 | 194 | } else { |
195 | 195 | $links[] = Arr::only($item, ['title', 'uri', 'icon']); |
@@ -311,10 +311,10 @@ discard block |
||
311 | 311 | 'middleware' => config('admin.route.middleware'), |
312 | 312 | ]; |
313 | 313 | |
314 | - app('router')->group($attributes, function ($router) { |
|
314 | + app('router')->group($attributes, function($router) { |
|
315 | 315 | |
316 | 316 | /* @var \Illuminate\Support\Facades\Route $router */ |
317 | - $router->namespace('\Encore\Admin\Controllers')->group(function ($router) { |
|
317 | + $router->namespace('\Encore\Admin\Controllers')->group(function($router) { |
|
318 | 318 | |
319 | 319 | /* @var \Illuminate\Routing\Router $router */ |
320 | 320 | $router->resource('auth/users', 'UserController')->names('admin.auth.users'); |
@@ -71,11 +71,11 @@ |
||
71 | 71 | $this->right(new RefreshButton()); |
72 | 72 | } |
73 | 73 | |
74 | - if (! isset($this->elements[$part]) || $this->elements[$part]->isEmpty()) { |
|
74 | + if (!isset($this->elements[$part]) || $this->elements[$part]->isEmpty()) { |
|
75 | 75 | return ''; |
76 | 76 | } |
77 | 77 | |
78 | - return $this->elements[$part]->map(function ($element) { |
|
78 | + return $this->elements[$part]->map(function($element) { |
|
79 | 79 | if ($element instanceof Htmlable) { |
80 | 80 | return $element->toHtml(); |
81 | 81 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | $current = $current ?: request($this->stepName, 0); |
57 | 57 | |
58 | - if (! isset($steps[$current])) { |
|
58 | + if (!isset($steps[$current])) { |
|
59 | 59 | $current = key($steps); |
60 | 60 | } |
61 | 61 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $class = $this->steps[$this->current]; |
71 | 71 | |
72 | - if (! is_subclass_of($class, StepForm::class)) { |
|
72 | + if (!is_subclass_of($class, StepForm::class)) { |
|
73 | 73 | admin_error("Class [{$class}] must be a sub-class of [Encore\Admin\Widgets\StepForm]."); |
74 | 74 | |
75 | 75 | return; |