We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | (array) config('backpack.base.middleware_key', 'admin'), |
| 16 | 16 | 'prefix' => config('backpack.base.route_prefix', 'admin'), |
| 17 | 17 | ], |
| 18 | - function () { |
|
| 18 | + function() { |
|
| 19 | 19 | Route::crud('users', 'Backpack\CRUD\Tests\Config\Http\Controllers\UserCrudController'); |
| 20 | 20 | } |
| 21 | 21 | ); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | 'password' => 'test', |
| 46 | 46 | ]); |
| 47 | 47 | |
| 48 | - $request->setRouteResolver(function () use ($request) { |
|
| 48 | + $request->setRouteResolver(function() use ($request) { |
|
| 49 | 49 | return (new Route('POST', 'users', ['Backpack\CRUD\Tests\Config\Http\Controllers\UserCrudController', 'create']))->bind($request); |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | 'email' => '', |
| 86 | 86 | ]); |
| 87 | 87 | |
| 88 | - $request->setRouteResolver(function () use ($request) { |
|
| 88 | + $request->setRouteResolver(function() use ($request) { |
|
| 89 | 89 | return (new Route('POST', 'users', ['Backpack\CRUD\Tests\Config\Http\Controllers\UserCrudController', 'create']))->bind($request); |
| 90 | 90 | }); |
| 91 | 91 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | 'password' => 'test', |
| 126 | 126 | ]); |
| 127 | 127 | |
| 128 | - $request->setRouteResolver(function () use ($request) { |
|
| 128 | + $request->setRouteResolver(function() use ($request) { |
|
| 129 | 129 | return (new Route('POST', 'users', ['Backpack\CRUD\Tests\Config\Http\Controllers\UserCrudController', 'create']))->bind($request); |
| 130 | 130 | }); |
| 131 | 131 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | 'name' => 'test', |
| 248 | 248 | ]); |
| 249 | 249 | |
| 250 | - $request->setRouteResolver(function () use ($request) { |
|
| 250 | + $request->setRouteResolver(function() use ($request) { |
|
| 251 | 251 | return (new Route('POST', 'users', ['Backpack\CRUD\Tests\Config\Http\Controllers\UserCrudController', 'create']))->bind($request); |
| 252 | 252 | }); |
| 253 | 253 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | return $this->getPath().$fileName; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if (! $value && CrudPanelFacade::getRequest()->has($this->getNameForRequest()) && $previousFile) { |
|
| 26 | + if (!$value && CrudPanelFacade::getRequest()->has($this->getNameForRequest()) && $previousFile) { |
|
| 27 | 27 | Storage::disk($this->getDisk())->delete($previousFile); |
| 28 | 28 | |
| 29 | 29 | return null; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | foreach ($previousRepeatableValues as $row => $file) { |
| 50 | - if ($file && ! isset($orderedFiles[$row])) { |
|
| 50 | + if ($file && !isset($orderedFiles[$row])) { |
|
| 51 | 51 | $orderedFiles[$row] = null; |
| 52 | 52 | Storage::disk($this->getDisk())->delete($file); |
| 53 | 53 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $value = $value ?? CRUD::getRequest()->get($this->getName()); |
| 15 | 15 | $previousImage = $this->getPreviousFiles($entry); |
| 16 | 16 | |
| 17 | - if (! $value && $previousImage) { |
|
| 17 | + if (!$value && $previousImage) { |
|
| 18 | 18 | Storage::disk($this->getDisk())->delete($previousImage); |
| 19 | 19 | |
| 20 | 20 | return null; |
@@ -67,6 +67,6 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | protected function shouldKeepPreviousValueUnchanged(Model $entry, $entryValue): bool |
| 69 | 69 | { |
| 70 | - return $entry->exists && is_string($entryValue) && ! Str::startsWith($entryValue, 'data:image'); |
|
| 70 | + return $entry->exists && is_string($entryValue) && !Str::startsWith($entryValue, 'data:image'); |
|
| 71 | 71 | } |
| 72 | 72 | } |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | class MultipleFiles extends Uploader |
| 12 | 12 | { |
| 13 | - public static function for(array $field, $configuration): UploaderInterface |
|
| 13 | + public static function for (array $field, $configuration): UploaderInterface |
|
| 14 | 14 | { |
| 15 | 15 | return (new self($field, $configuration))->multiple(); |
| 16 | 16 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $previousFiles = []; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if (! is_array($previousFiles) && is_string($previousFiles)) { |
|
| 32 | + if (!is_array($previousFiles) && is_string($previousFiles)) { |
|
| 33 | 33 | $previousFiles = json_decode($previousFiles, true); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -38,14 +38,14 @@ discard block |
||
| 38 | 38 | if (in_array($previousFile, $filesToDelete)) { |
| 39 | 39 | Storage::disk($this->getDisk())->delete($previousFile); |
| 40 | 40 | |
| 41 | - $previousFiles = Arr::where($previousFiles, function ($value, $key) use ($previousFile) { |
|
| 41 | + $previousFiles = Arr::where($previousFiles, function($value, $key) use ($previousFile) { |
|
| 42 | 42 | return $value != $previousFile; |
| 43 | 43 | }); |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if (! is_array($value)) { |
|
| 48 | + if (!is_array($value)) { |
|
| 49 | 49 | $value = []; |
| 50 | 50 | } |
| 51 | 51 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function getNotnull() |
| 24 | 24 | { |
| 25 | - return ! $this->column['nullable']; |
|
| 25 | + return !$this->column['nullable']; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | public function getDefault() |
@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | $this->getDbColumnTypes(); |
| 16 | 16 | |
| 17 | - array_map(function ($field) use ($setFields, $setColumns) { |
|
| 18 | - if ($setFields && ! isset($this->getCleanStateFields()[$field])) { |
|
| 17 | + array_map(function($field) use ($setFields, $setColumns) { |
|
| 18 | + if ($setFields && !isset($this->getCleanStateFields()[$field])) { |
|
| 19 | 19 | $this->addField([ |
| 20 | 20 | 'name' => $field, |
| 21 | 21 | 'label' => $this->makeLabel($field), |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ]); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - if ($setColumns && ! in_array($field, $this->model->getHidden()) && ! isset($this->columns()[$field])) { |
|
| 31 | + if ($setColumns && !in_array($field, $this->model->getHidden()) && !isset($this->columns()[$field])) { |
|
| 32 | 32 | $this->addColumn([ |
| 33 | 33 | 'name' => $field, |
| 34 | 34 | 'label' => $this->makeLabel($field), |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $dbColumnTypes = []; |
| 52 | 52 | |
| 53 | - if (! $this->driverIsSql()) { |
|
| 53 | + if (!$this->driverIsSql()) { |
|
| 54 | 54 | return $dbColumnTypes; |
| 55 | 55 | } |
| 56 | 56 | $dbColumns = $this->getDbTableColumns(); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $dbColumnTypes = $this->getDbColumnTypes(); |
| 117 | 117 | |
| 118 | - if (! isset($dbColumnTypes[$fieldName])) { |
|
| 118 | + if (!isset($dbColumnTypes[$fieldName])) { |
|
| 119 | 119 | return 'text'; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -210,12 +210,12 @@ discard block |
||
| 210 | 210 | { |
| 211 | 211 | $fillable = $this->model->getFillable(); |
| 212 | 212 | |
| 213 | - if (! $this->driverIsSql()) { |
|
| 213 | + if (!$this->driverIsSql()) { |
|
| 214 | 214 | $columns = $fillable; |
| 215 | 215 | } else { |
| 216 | 216 | // Automatically-set columns should be both in the database, and in the $fillable variable on the Eloquent Model |
| 217 | 217 | $columns = $this->model::getDbTableSchema()->getColumnsNames(); |
| 218 | - if (! empty($fillable)) { |
|
| 218 | + if (!empty($fillable)) { |
|
| 219 | 219 | $columns = array_intersect($columns, $fillable); |
| 220 | 220 | } |
| 221 | 221 | } |
@@ -848,7 +848,7 @@ |
||
| 848 | 848 | |
| 849 | 849 | public function testSetDoctrineTypesMapping() |
| 850 | 850 | { |
| 851 | - if (! method_exists($this->crudPanel->getModel()->getConnection(), 'getDoctrineConnection')) { |
|
| 851 | + if (!method_exists($this->crudPanel->getModel()->getConnection(), 'getDoctrineConnection')) { |
|
| 852 | 852 | $this->markTestSkipped('This test is only for Laravel 10, Laravel 11 does not have dbal as a dependency anymore'); |
| 853 | 853 | } |
| 854 | 854 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | $connection = DB::connection($this->getConnectionName()); |
| 24 | 24 | |
| 25 | - if (! method_exists($connection, 'getDoctrineSchemaManager')) { |
|
| 25 | + if (!method_exists($connection, 'getDoctrineSchemaManager')) { |
|
| 26 | 26 | return $connection; |
| 27 | 27 | } |
| 28 | 28 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | if (self::isSqlConnection()) { |
| 36 | 36 | $platform = $connection->getDoctrineSchemaManager()->getDatabasePlatform(); |
| 37 | 37 | foreach ($types as $type_key => $type_value) { |
| 38 | - if (! $platform->hasDoctrineTypeMappingFor($type_key)) { |
|
| 38 | + if (!$platform->hasDoctrineTypeMappingFor($type_key)) { |
|
| 39 | 39 | $platform->registerDoctrineTypeMapping($type_key, $type_value); |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function getColumnType($columnName) |
| 67 | 67 | { |
| 68 | - if (! self::isSqlConnection()) { |
|
| 68 | + if (!self::isSqlConnection()) { |
|
| 69 | 69 | return 'text'; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public static function isColumnNullable($columnName) |
| 82 | 82 | { |
| 83 | - if (! self::isSqlConnection()) { |
|
| 83 | + if (!self::isSqlConnection()) { |
|
| 84 | 84 | return true; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public static function dbColumnHasDefault($columnName) |
| 97 | 97 | { |
| 98 | - if (! self::isSqlConnection()) { |
|
| 98 | + if (!self::isSqlConnection()) { |
|
| 99 | 99 | return false; |
| 100 | 100 | } |
| 101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public static function getDbColumnDefault($columnName) |
| 112 | 112 | { |
| 113 | - if (! self::isSqlConnection()) { |
|
| 113 | + if (!self::isSqlConnection()) { |
|
| 114 | 114 | return false; |
| 115 | 115 | } |
| 116 | 116 | |