We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public array $hooks = []; |
| 8 | 8 | |
| 9 | - public static function register(string $hook, string|array $operations, callable $callback): void |
|
| 9 | + public static function register(string $hook, string | array $operations, callable $callback): void |
|
| 10 | 10 | { |
| 11 | 11 | $operations = is_array($operations) ? $operations : [$operations]; |
| 12 | 12 | |
@@ -37,11 +37,11 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $this->crud->allowAccess('create'); |
| 39 | 39 | |
| 40 | - BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, 'create', function () { |
|
| 40 | + BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, 'create', function() { |
|
| 41 | 41 | $this->crud->setupDefaultSaveActions(); |
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | - BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, 'list', function () { |
|
| 44 | + BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, 'list', function() { |
|
| 45 | 45 | $this->crud->addButton('top', 'create', 'view', 'crud::buttons.create'); |
| 46 | 46 | }); |
| 47 | 47 | } |
@@ -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); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | protected function setupConfigurationForCurrentOperation() |
| 103 | 103 | { |
| 104 | 104 | $operationName = $this->crud->getCurrentOperation(); |
| 105 | - if (! $operationName) { |
|
| 105 | + if (!$operationName) { |
|
| 106 | 106 | return; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | * you'd like the defaults to be applied before anything you write. That way, anything you |
| 119 | 119 | * write is done after the default, so you can remove default settings, etc; |
| 120 | 120 | */ |
| 121 | - if (! BackpackHooks::has(OperationHooks::SETUP_OPERATION_FROM_CONFIG, $operationName)) { |
|
| 122 | - BackpackHooks::register(OperationHooks::SETUP_OPERATION_FROM_CONFIG, $operationName, function () { |
|
| 121 | + if (!BackpackHooks::has(OperationHooks::SETUP_OPERATION_FROM_CONFIG, $operationName)) { |
|
| 122 | + BackpackHooks::register(OperationHooks::SETUP_OPERATION_FROM_CONFIG, $operationName, function() { |
|
| 123 | 123 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
| 124 | 124 | }); |
| 125 | 125 | } |
@@ -40,24 +40,24 @@ |
||
| 40 | 40 | // Access |
| 41 | 41 | $this->crud->allowAccess($operationName); |
| 42 | 42 | |
| 43 | - BackpackHooks::register(OperationHooks::SETUP_OPERATION_FROM_CONFIG, $operationName, function () use ($operationName) { |
|
| 43 | + BackpackHooks::register(OperationHooks::SETUP_OPERATION_FROM_CONFIG, $operationName, function() use ($operationName) { |
|
| 44 | 44 | return config()->has('backpack.operations.'.$operationName) ? 'backpack.operations.'.$operationName : 'backpack.operations.form'; |
| 45 | 45 | }); |
| 46 | 46 | |
| 47 | - BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, $operationName, function () use ($operationName) { |
|
| 47 | + BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, $operationName, function() use ($operationName) { |
|
| 48 | 48 | $this->crud->addSaveAction([ |
| 49 | 49 | 'name' => 'save_and_back', |
| 50 | - 'visible' => function ($crud) use ($operationName) { |
|
| 50 | + 'visible' => function($crud) use ($operationName) { |
|
| 51 | 51 | return $crud->hasAccess($operationName); |
| 52 | 52 | }, |
| 53 | - 'redirect' => function ($crud, $request, $itemId = null) { |
|
| 53 | + 'redirect' => function($crud, $request, $itemId = null) { |
|
| 54 | 54 | return $request->request->has('_http_referrer') ? $request->request->get('_http_referrer') : $crud->route; |
| 55 | 55 | }, |
| 56 | 56 | 'button_text' => trans('backpack::crud.save_action_save_and_back'), |
| 57 | 57 | ]); |
| 58 | 58 | }); |
| 59 | 59 | |
| 60 | - BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, ['list', 'show'], function () use ($operationName, $buttonStack, $buttonMeta) { |
|
| 60 | + BackpackHooks::register(OperationHooks::BEFORE_OPERATION_SETUP, ['list', 'show'], function() use ($operationName, $buttonStack, $buttonMeta) { |
|
| 61 | 61 | $this->crud->button($operationName)->view('crud::buttons.quick')->stack($buttonStack)->meta($buttonMeta); |
| 62 | 62 | }); |
| 63 | 63 | } |