We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // |
38 | 38 | // It's done inside a middleware closure in order to have |
39 | 39 | // the complete request inside the CrudPanel object. |
40 | - $this->middleware(function ($request, $next) { |
|
40 | + $this->middleware(function($request, $next) { |
|
41 | 41 | $this->crud = app('crud'); |
42 | 42 | |
43 | 43 | $this->crud->setRequest($request); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | protected function setupConfigurationForCurrentOperation() |
109 | 109 | { |
110 | 110 | $operationName = $this->crud->getCurrentOperation(); |
111 | - if (! $operationName) { |
|
111 | + if (!$operationName) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 | |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | * you'd like the defaults to be applied before anything you write. That way, anything you |
125 | 125 | * write is done after the default, so you can remove default settings, etc; |
126 | 126 | */ |
127 | - if (! LifecycleHook::has($operationName.':setup_operation_config')) { |
|
128 | - LifecycleHook::hookInto($operationName.':setup_operation_config', function () use ($operationName) { |
|
127 | + if (!LifecycleHook::has($operationName.':setup_operation_config')) { |
|
128 | + LifecycleHook::hookInto($operationName.':setup_operation_config', function() use ($operationName) { |
|
129 | 129 | return 'backpack.operations.'.$operationName; |
130 | 130 | }); |
131 | 131 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | $this->crud->allowAccess('delete'); |
32 | 32 | |
33 | - LifecycleHook::hookInto(['list:before_setup', 'show:before_setup'], function () { |
|
33 | + LifecycleHook::hookInto(['list:before_setup', 'show:before_setup'], function() { |
|
34 | 34 | $this->crud->addButton('line', 'delete', 'view', 'crud::buttons.delete', 'end'); |
35 | 35 | }); |
36 | 36 | } |
@@ -36,11 +36,11 @@ |
||
36 | 36 | { |
37 | 37 | $this->crud->allowAccess('create'); |
38 | 38 | |
39 | - LifecycleHook::hookInto('create:before_setup', function () { |
|
39 | + LifecycleHook::hookInto('create:before_setup', function() { |
|
40 | 40 | $this->crud->setupDefaultSaveActions(); |
41 | 41 | }); |
42 | 42 | |
43 | - LifecycleHook::hookInto('list:before_setup', function () { |
|
43 | + LifecycleHook::hookInto('list:before_setup', function() { |
|
44 | 44 | $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create'); |
45 | 45 | }); |
46 | 46 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | { |
7 | 7 | public array $hooks = []; |
8 | 8 | |
9 | - public function hookInto(string|array $hooks, callable $callback): void |
|
9 | + public function hookInto(string | array $hooks, callable $callback): void |
|
10 | 10 | { |
11 | 11 | $hooks = is_array($hooks) ? $hooks : [$hooks]; |
12 | 12 | foreach ($hooks as $hook) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | - public function trigger(string|array $hooks, array $parameters): void |
|
17 | + public function trigger(string | array $hooks, array $parameters): void |
|
18 | 18 | { |
19 | 19 | $hooks = is_array($hooks) ? $hooks : [$hooks]; |
20 | 20 | foreach ($hooks as $hook) { |
@@ -83,28 +83,28 @@ discard block |
||
83 | 83 | $this->registerBackpackErrorViews(); |
84 | 84 | |
85 | 85 | // Bind the CrudPanel object to Laravel's service container |
86 | - $this->app->scoped('crud', function ($app) { |
|
86 | + $this->app->scoped('crud', function($app) { |
|
87 | 87 | return new CrudPanel(); |
88 | 88 | }); |
89 | 89 | |
90 | - $this->app->scoped('DatabaseSchema', function ($app) { |
|
90 | + $this->app->scoped('DatabaseSchema', function($app) { |
|
91 | 91 | return new DatabaseSchema(); |
92 | 92 | }); |
93 | 93 | |
94 | - $this->app->scoped('lifecycle-hook', function ($app) { |
|
94 | + $this->app->scoped('lifecycle-hook', function($app) { |
|
95 | 95 | return new app\Library\CrudPanel\Hooks\LifecycleHooks(); |
96 | 96 | }); |
97 | 97 | |
98 | - $this->app->singleton('BackpackViewNamespaces', function ($app) { |
|
98 | + $this->app->singleton('BackpackViewNamespaces', function($app) { |
|
99 | 99 | return new ViewNamespaces(); |
100 | 100 | }); |
101 | 101 | |
102 | 102 | // Bind the widgets collection object to Laravel's service container |
103 | - $this->app->singleton('widgets', function ($app) { |
|
103 | + $this->app->singleton('widgets', function($app) { |
|
104 | 104 | return new Collection(); |
105 | 105 | }); |
106 | 106 | |
107 | - $this->app->scoped('UploadersRepository', function ($app) { |
|
107 | + $this->app->scoped('UploadersRepository', function($app) { |
|
108 | 108 | return new UploadersRepository(); |
109 | 109 | }); |
110 | 110 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $middleware_key = config('backpack.base.middleware_key'); |
121 | 121 | $middleware_class = config('backpack.base.middleware_class'); |
122 | 122 | |
123 | - if (! is_array($middleware_class)) { |
|
123 | + if (!is_array($middleware_class)) { |
|
124 | 124 | $router->pushMiddlewareToGroup($middleware_key, $middleware_class); |
125 | 125 | |
126 | 126 | return; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $configs = scandir(__DIR__."/config/backpack/$dir/"); |
236 | 236 | $configs = array_diff($configs, ['.', '..']); |
237 | 237 | |
238 | - if (! count($configs)) { |
|
238 | + if (!count($configs)) { |
|
239 | 239 | return; |
240 | 240 | } |
241 | 241 | |
@@ -284,8 +284,7 @@ discard block |
||
284 | 284 | // add the backpack_users password broker to the configuration |
285 | 285 | $laravelAuthPasswordBrokers = app()->config['auth.passwords']; |
286 | 286 | $laravelFirstPasswordBroker = is_array($laravelAuthPasswordBrokers) && current($laravelAuthPasswordBrokers) ? |
287 | - current($laravelAuthPasswordBrokers)['table'] : |
|
288 | - ''; |
|
287 | + current($laravelAuthPasswordBrokers)['table'] : ''; |
|
289 | 288 | |
290 | 289 | $backpackPasswordBrokerTable = config('backpack.base.password_resets_table') ?? |
291 | 290 | config('auth.passwords.users.table') ?? |
@@ -313,7 +312,7 @@ discard block |
||
313 | 312 | |
314 | 313 | public function loadViewComponents() |
315 | 314 | { |
316 | - $this->app->afterResolving(BladeCompiler::class, function () { |
|
315 | + $this->app->afterResolving(BladeCompiler::class, function() { |
|
317 | 316 | Blade::componentNamespace('Backpack\\CRUD\\app\\View\\Components', 'backpack'); |
318 | 317 | }); |
319 | 318 | } |
@@ -339,13 +338,13 @@ discard block |
||
339 | 338 | private function registerBackpackErrorViews() |
340 | 339 | { |
341 | 340 | // register the backpack error when the exception handler is resolved from the container |
342 | - $this->callAfterResolving(ExceptionHandler::class, function ($handler) { |
|
343 | - if (! Str::startsWith(request()->path(), config('backpack.base.route_prefix'))) { |
|
341 | + $this->callAfterResolving(ExceptionHandler::class, function($handler) { |
|
342 | + if (!Str::startsWith(request()->path(), config('backpack.base.route_prefix'))) { |
|
344 | 343 | return; |
345 | 344 | } |
346 | 345 | |
347 | 346 | // parse the namespaces set in config |
348 | - [$themeNamespace, $themeFallbackNamespace] = (function () { |
|
347 | + [$themeNamespace, $themeFallbackNamespace] = (function() { |
|
349 | 348 | $themeNamespace = config('backpack.ui.view_namespace'); |
350 | 349 | $themeFallbackNamespace = config('backpack.ui.view_namespace_fallback'); |
351 | 350 | |
@@ -362,8 +361,7 @@ discard block |
||
362 | 361 | // - fallback theme paths |
363 | 362 | // - ui path |
364 | 363 | $themeErrorPaths = $viewFinderHints[$themeNamespace] ?? []; |
365 | - $themeErrorPaths = $themeNamespace === $themeFallbackNamespace ? $themeErrorPaths : |
|
366 | - array_merge($viewFinderHints[$themeFallbackNamespace] ?? [], $themeErrorPaths); |
|
364 | + $themeErrorPaths = $themeNamespace === $themeFallbackNamespace ? $themeErrorPaths : array_merge($viewFinderHints[$themeFallbackNamespace] ?? [], $themeErrorPaths); |
|
367 | 365 | $uiErrorPaths = [base_path('vendor/backpack/crud/src/resources/views/ui')]; |
368 | 366 | $themeErrorPaths = array_merge($themeErrorPaths, $uiErrorPaths); |
369 | 367 |
@@ -39,24 +39,24 @@ |
||
39 | 39 | // Access |
40 | 40 | $this->crud->allowAccess($operationName); |
41 | 41 | |
42 | - LifecycleHook::hookInto('crud:setup_operation_config', function () use ($operationName) { |
|
42 | + LifecycleHook::hookInto('crud:setup_operation_config', function() use ($operationName) { |
|
43 | 43 | return config()->has('backpack.operations.'.$operationName) ? 'backpack.operations.'.$operationName : 'backpack.operations.form'; |
44 | 44 | }); |
45 | 45 | |
46 | - LifecycleHook::hookInto($operationName.':before_setup', function () use ($operationName) { |
|
46 | + LifecycleHook::hookInto($operationName.':before_setup', function() use ($operationName) { |
|
47 | 47 | $this->crud->addSaveAction([ |
48 | 48 | 'name' => 'save_and_back', |
49 | - 'visible' => function ($crud) use ($operationName) { |
|
49 | + 'visible' => function($crud) use ($operationName) { |
|
50 | 50 | return $crud->hasAccess($operationName); |
51 | 51 | }, |
52 | - 'redirect' => function ($crud, $request, $itemId = null) { |
|
52 | + 'redirect' => function($crud, $request, $itemId = null) { |
|
53 | 53 | return $request->request->has('_http_referrer') ? $request->request->get('_http_referrer') : $crud->route; |
54 | 54 | }, |
55 | 55 | 'button_text' => trans('backpack::crud.save_action_save_and_back'), |
56 | 56 | ]); |
57 | 57 | }); |
58 | 58 | |
59 | - LifecycleHook::hookInto(['list:before_setup', 'show:before_setup'], function () use ($operationName, $buttonStack, $buttonMeta) { |
|
59 | + LifecycleHook::hookInto(['list:before_setup', 'show:before_setup'], function() use ($operationName, $buttonStack, $buttonMeta) { |
|
60 | 60 | $this->crud->button($operationName)->view('crud::buttons.quick')->stack($buttonStack)->meta($buttonMeta); |
61 | 61 | }); |
62 | 62 | } |