We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -38,19 +38,19 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function handle($request, Closure $next) |
40 | 40 | { |
41 | - if (! $request->hasSession() || ! $this->user) { |
|
41 | + if (!$request->hasSession() || !$this->user) { |
|
42 | 42 | return $next($request); |
43 | 43 | } |
44 | 44 | |
45 | 45 | if ($this->guard()->viaRemember()) { |
46 | 46 | $passwordHash = explode('|', $request->cookies->get($this->guard()->getRecallerName()))[2] ?? null; |
47 | 47 | |
48 | - if (! $passwordHash || $passwordHash != $this->user->getAuthPassword()) { |
|
48 | + if (!$passwordHash || $passwordHash != $this->user->getAuthPassword()) { |
|
49 | 49 | $this->logout($request); |
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | - if (! $request->session()->has('password_hash_'.backpack_guard_name())) { |
|
53 | + if (!$request->session()->has('password_hash_'.backpack_guard_name())) { |
|
54 | 54 | $this->storePasswordHashInSession($request); |
55 | 55 | } |
56 | 56 | |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | $this->logout($request); |
59 | 59 | } |
60 | 60 | |
61 | - return tap($next($request), function () use ($request) { |
|
62 | - if (! is_null($this->guard()->user())) { |
|
61 | + return tap($next($request), function() use ($request) { |
|
62 | + if (!is_null($this->guard()->user())) { |
|
63 | 63 | $this->storePasswordHashInSession($request); |
64 | 64 | } |
65 | 65 | }); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | protected function storePasswordHashInSession($request) |
75 | 75 | { |
76 | - if (! $this->user) { |
|
76 | + if (!$this->user) { |
|
77 | 77 | return; |
78 | 78 | } |
79 | 79 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public static function addFor(string $domain, $viewNamespaces) |
30 | 30 | { |
31 | 31 | foreach ((array) $viewNamespaces as $viewNamespace) { |
32 | - if (! in_array($viewNamespace, self::getForDomain($domain))) { |
|
32 | + if (!in_array($viewNamespace, self::getForDomain($domain))) { |
|
33 | 33 | self::$viewNamespaces[$domain][] = $viewNamespace; |
34 | 34 | } |
35 | 35 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | public static function getFullNamespacesFor(string $domain, string $viewName) |
77 | 77 | { |
78 | - return array_map(function ($item) use ($viewName) { |
|
78 | + return array_map(function($item) use ($viewName) { |
|
79 | 79 | return $item.'.'.$viewName; |
80 | 80 | }, self::getFor($domain)); |
81 | 81 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function makeFirstColumn() |
115 | 115 | { |
116 | - if (! $this->columns()) { |
|
116 | + if (!$this->columns()) { |
|
117 | 117 | return false; |
118 | 118 | } |
119 | 119 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function removeColumns($columns) |
159 | 159 | { |
160 | - if (! empty($columns)) { |
|
160 | + if (!empty($columns)) { |
|
161 | 161 | foreach ($columns as $columnKey) { |
162 | 162 | $this->removeColumn($columnKey); |
163 | 163 | } |
@@ -252,16 +252,16 @@ discard block |
||
252 | 252 | $columns = $this->columns(); |
253 | 253 | $relations = []; |
254 | 254 | foreach ($columns as $column) { |
255 | - if (! isset($column['entity']) || ! $column['entity']) { |
|
255 | + if (!isset($column['entity']) || !$column['entity']) { |
|
256 | 256 | continue; |
257 | 257 | } |
258 | - if (! isset($column['subfields'])) { |
|
258 | + if (!isset($column['subfields'])) { |
|
259 | 259 | array_push($relations, $column['entity']); |
260 | 260 | |
261 | 261 | continue; |
262 | 262 | } |
263 | 263 | foreach ($column['subfields'] as $subfield) { |
264 | - if (! isset($subfield['entity']) || ! $subfield['entity'] || ($subfield['is_pivot_select'] ?? false)) { |
|
264 | + if (!isset($subfield['entity']) || !$subfield['entity'] || ($subfield['is_pivot_select'] ?? false)) { |
|
265 | 265 | continue; |
266 | 266 | } |
267 | 267 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function hasColumnWhere($attribute, $value) |
344 | 344 | { |
345 | - $match = Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
345 | + $match = Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
346 | 346 | return isset($column[$attribute]) && $column[$attribute] == $value; |
347 | 347 | }); |
348 | 348 | |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public function firstColumnWhere($attribute, $value) |
360 | 360 | { |
361 | - return Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
361 | + return Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
362 | 362 | return isset($column[$attribute]) && $column[$attribute] == $value; |
363 | 363 | }); |
364 | 364 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | // if there's a model defined, but no attribute |
392 | 392 | // guess an attribute using the identifiableAttribute functionality in CrudTrait |
393 | - if (isset($column['model']) && ! isset($column['attribute']) && method_exists($column['model'], 'identifiableAttribute')) { |
|
393 | + if (isset($column['model']) && !isset($column['attribute']) && method_exists($column['model'], 'identifiableAttribute')) { |
|
394 | 394 | $column['attribute'] = (new $column['model'])->identifiableAttribute(); |
395 | 395 | } |
396 | 396 | |
@@ -415,8 +415,8 @@ discard block |
||
415 | 415 | */ |
416 | 416 | public function countColumnsWithoutActions() |
417 | 417 | { |
418 | - return collect($this->columns())->filter(function ($column, $key) { |
|
419 | - return ! isset($column['hasActions']) || $column['hasActions'] == false; |
|
418 | + return collect($this->columns())->filter(function($column, $key) { |
|
419 | + return !isset($column['hasActions']) || $column['hasActions'] == false; |
|
420 | 420 | })->count(); |
421 | 421 | } |
422 | 422 |