@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | protected function shouldLogOperation(Request $request) |
47 | 47 | { |
48 | 48 | return config('admin.operation_log.enable') |
49 | - && ! $this->inExceptArray($request) |
|
49 | + && !$this->inExceptArray($request) |
|
50 | 50 | && $this->inAllowedMethods($request->method()) |
51 | 51 | && Admin::user(); |
52 | 52 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return true; |
67 | 67 | } |
68 | 68 | |
69 | - return $allowedMethods->map(function ($method) { |
|
69 | + return $allowedMethods->map(function($method) { |
|
70 | 70 | return strtoupper($method); |
71 | 71 | })->contains($method); |
72 | 72 | } |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | { |
24 | 24 | $response = $next($request); |
25 | 25 | |
26 | - if (! $request->pjax() || $response->isRedirection() || Admin::guard()->guest()) { |
|
26 | + if (!$request->pjax() || $response->isRedirection() || Admin::guard()->guest()) { |
|
27 | 27 | return $response; |
28 | 28 | } |
29 | 29 | |
30 | - if (! $response->isSuccessful()) { |
|
30 | + if (!$response->isSuccessful()) { |
|
31 | 31 | return $this->handleErrorResponse($response); |
32 | 32 | } |
33 | 33 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public static function respond(Response $response) |
49 | 49 | { |
50 | - $next = function () use ($response) { |
|
50 | + $next = function() use ($response) { |
|
51 | 51 | return $response; |
52 | 52 | }; |
53 | 53 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | $content = $crawler->filter($container); |
125 | 125 | |
126 | - if (! $content->count()) { |
|
126 | + if (!$content->count()) { |
|
127 | 127 | abort(422); |
128 | 128 | } |
129 | 129 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | protected function decodeUtf8HtmlEntities($html) |
141 | 141 | { |
142 | - return preg_replace_callback('/(&#[0-9]+;)/', function ($html) { |
|
142 | + return preg_replace_callback('/(&#[0-9]+;)/', function($html) { |
|
143 | 143 | return mb_convert_encoding($html[1], 'UTF-8', 'HTML-ENTITIES'); |
144 | 144 | }, $html); |
145 | 145 | } |
@@ -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 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function toastr() |
60 | 60 | { |
61 | - if (! $this->plugin instanceof Toastr) { |
|
61 | + if (!$this->plugin instanceof Toastr) { |
|
62 | 62 | $this->plugin = new Toastr(); |
63 | 63 | } |
64 | 64 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function swal() |
72 | 72 | { |
73 | - if (! $this->plugin instanceof SweatAlert2) { |
|
73 | + if (!$this->plugin instanceof SweatAlert2) { |
|
74 | 74 | $this->plugin = new SweatAlert2(); |
75 | 75 | } |
76 | 76 |
@@ -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 |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public static function makeSelector($class, $prefix) |
142 | 142 | { |
143 | - if (! isset(static::$selectors[$class])) { |
|
143 | + if (!isset(static::$selectors[$class])) { |
|
144 | 144 | static::$selectors[$class] = uniqid($prefix).mt_rand(1000, 9999); |
145 | 145 | } |
146 | 146 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | */ |
262 | 262 | protected function addScript() |
263 | 263 | { |
264 | - if (! is_null($this->interactor)) { |
|
264 | + if (!is_null($this->interactor)) { |
|
265 | 265 | return $this->interactor->addScript(); |
266 | 266 | } |
267 | 267 |
@@ -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 { |
@@ -110,7 +110,7 @@ |
||
110 | 110 | */ |
111 | 111 | public function retrieveModel(Request $request) |
112 | 112 | { |
113 | - if (! $key = $request->get('_key')) { |
|
113 | + if (!$key = $request->get('_key')) { |
|
114 | 114 | return false; |
115 | 115 | } |
116 | 116 |