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 | * |
| 16 | 16 | * @param int $id The id of the item to be deleted. |
| 17 | 17 | * |
| 18 | - * @return bool True if the item was deleted. |
|
| 18 | + * @return string True if the item was deleted. |
|
| 19 | 19 | * |
| 20 | 20 | * @throws \Illuminate\Database\Eloquent\ModelNotFoundException if the model was not found. |
| 21 | 21 | * |
@@ -129,6 +129,7 @@ |
||
| 129 | 129 | * Turn a database column name or PHP variable into a pretty label to be shown to the user. |
| 130 | 130 | * |
| 131 | 131 | * @param [string] |
| 132 | + * @param string $value |
|
| 132 | 133 | * |
| 133 | 134 | * @return [string] |
| 134 | 135 | */ |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $this->setDoctrineTypesMapping(); |
| 18 | 18 | $this->getDbColumnTypes(); |
| 19 | 19 | |
| 20 | - array_map(function ($field) { |
|
| 20 | + array_map(function($field) { |
|
| 21 | 21 | // $this->labels[$field] = $this->makeLabel($field); |
| 22 | 22 | |
| 23 | 23 | $new_field = [ |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | 'attributes' => [], |
| 31 | 31 | 'autoset' => true, |
| 32 | 32 | ]; |
| 33 | - if (! isset($this->create_fields[$field])) { |
|
| 33 | + if (!isset($this->create_fields[$field])) { |
|
| 34 | 34 | $this->create_fields[$field] = $new_field; |
| 35 | 35 | } |
| 36 | - if (! isset($this->update_fields[$field])) { |
|
| 36 | + if (!isset($this->update_fields[$field])) { |
|
| 37 | 37 | $this->update_fields[$field] = $new_field; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if (! in_array($field, $this->model->getHidden()) && ! isset($this->columns[$field])) { |
|
| 40 | + if (!in_array($field, $this->model->getHidden()) && !isset($this->columns[$field])) { |
|
| 41 | 41 | $this->addColumn([ |
| 42 | 42 | 'name' => $field, |
| 43 | 43 | 'label' => ucfirst($field), |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function getFieldTypeFromDbColumnType($field) |
| 79 | 79 | { |
| 80 | - if (! array_key_exists($field, $this->db_column_types)) { |
|
| 80 | + if (!array_key_exists($field, $this->db_column_types)) { |
|
| 81 | 81 | return 'text'; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $types = ['enum' => 'string']; |
| 145 | 145 | $platform = \DB::getDoctrineConnection()->getDatabasePlatform(); |
| 146 | 146 | foreach ($types as $type_key => $type_value) { |
| 147 | - if (! $platform->hasDoctrineTypeMappingFor($type_key)) { |
|
| 147 | + if (!$platform->hasDoctrineTypeMappingFor($type_key)) { |
|
| 148 | 148 | $platform->registerDoctrineTypeMapping($type_key, $type_value); |
| 149 | 149 | } |
| 150 | 150 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $columns = $this->model->getConnection()->getSchemaBuilder()->getColumnListing($this->model->getTable()); |
| 174 | 174 | $fillable = $this->model->getFillable(); |
| 175 | 175 | |
| 176 | - if (! empty($fillable)) { |
|
| 176 | + if (!empty($fillable)) { |
|
| 177 | 177 | $columns = array_intersect($columns, $fillable); |
| 178 | 178 | } |
| 179 | 179 | |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Backpack\CRUD\Tests\Unit\CrudPanel; |
| 4 | 4 | |
| 5 | -use Faker\Factory; |
|
| 6 | -use Backpack\CRUD\Tests\Unit\Models\User; |
|
| 7 | 5 | use Backpack\CRUD\Tests\Unit\Models\Article; |
| 6 | +use Backpack\CRUD\Tests\Unit\Models\User; |
|
| 7 | +use Faker\Factory; |
|
| 8 | 8 | |
| 9 | 9 | class CrudPanelCreateTest extends BaseDBCrudPanelTest |
| 10 | 10 | { |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Backpack\CRUD\Tests\Unit\CrudPanel; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Facades\DB; |
|
| 6 | 5 | use Backpack\CRUD\Tests\Unit\Models\Article; |
| 7 | 6 | use Illuminate\Database\Eloquent\ModelNotFoundException; |
| 7 | +use Illuminate\Support\Facades\DB; |
|
| 8 | 8 | |
| 9 | 9 | class CrudPanelDeleteTest extends BaseDBCrudPanelTest |
| 10 | 10 | { |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Backpack\CRUD\Tests\Unit\CrudPanel; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Collection; |
|
| 6 | -use Illuminate\Support\Facades\DB; |
|
| 7 | -use Backpack\CRUD\Tests\Unit\Models\User; |
|
| 8 | 5 | use Backpack\CRUD\Tests\Unit\Models\Article; |
| 6 | +use Backpack\CRUD\Tests\Unit\Models\User; |
|
| 9 | 7 | use Illuminate\Database\Eloquent\ModelNotFoundException; |
| 8 | +use Illuminate\Support\Collection; |
|
| 9 | +use Illuminate\Support\Facades\DB; |
|
| 10 | 10 | |
| 11 | 11 | class CrudPanelReadTest extends BaseDBCrudPanelTest |
| 12 | 12 | { |
@@ -13,13 +13,13 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('roles', function (Blueprint $table) { |
|
| 16 | + Schema::create('roles', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('name')->unique(); |
| 19 | 19 | $table->timestamps(); |
| 20 | 20 | }); |
| 21 | 21 | |
| 22 | - Schema::create('user_role', function (Blueprint $table) { |
|
| 22 | + Schema::create('user_role', function(Blueprint $table) { |
|
| 23 | 23 | $table->integer('user_id')->length(10)->unsigned(); |
| 24 | 24 | $table->integer('role_id')->length(10)->unsigned(); |
| 25 | 25 | $table->timestamps(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('addresses', function (Blueprint $table) { |
|
| 16 | + Schema::create('addresses', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->integer('account_details_id')->length(10)->unsigned(); |
| 19 | 19 | $table->string('city'); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('articles', function ($table) { |
|
| 15 | + Schema::create('articles', function($table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->integer('user_id')->length(10)->unsigned(); |
| 18 | 18 | $table->string('content'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('account_details', function (Blueprint $table) { |
|
| 16 | + Schema::create('account_details', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->integer('user_id')->length(10)->unsigned(); |
| 19 | 19 | $table->string('nickname'); |