From 3eee3284a5c2263abb10355a4647f7bccf805ded Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Fri, 20 Sep 2024 13:12:41 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Traits/QueryTrait.php | 2 +- tests/Commands/MakeCrudCommandTest.php | 2 +- .../Modules/MakeCrudModuleCommandTest.php | 32 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Traits/QueryTrait.php b/src/Traits/QueryTrait.php index 2ffe9af..953988c 100644 --- a/src/Traits/QueryTrait.php +++ b/src/Traits/QueryTrait.php @@ -22,7 +22,7 @@ private function addDBColumnsToString(array $itemsDB) $columns = ''; $excepts = config('laravel-crod.queries.except_columns_in_fillable', ['id', 'updated_at', 'created_at']); - if (! is_array($excepts)) { + if (!is_array($excepts)) { throw new \RuntimeException('Except columns is not an array'); } diff --git a/tests/Commands/MakeCrudCommandTest.php b/tests/Commands/MakeCrudCommandTest.php index f68de75..188413f 100644 --- a/tests/Commands/MakeCrudCommandTest.php +++ b/tests/Commands/MakeCrudCommandTest.php @@ -168,4 +168,4 @@ protected function migrationExists(string $mgr): bool return false; } -} \ No newline at end of file +} diff --git a/tests/Commands/Modules/MakeCrudModuleCommandTest.php b/tests/Commands/Modules/MakeCrudModuleCommandTest.php index f20ed1d..af1e885 100644 --- a/tests/Commands/Modules/MakeCrudModuleCommandTest.php +++ b/tests/Commands/Modules/MakeCrudModuleCommandTest.php @@ -120,21 +120,21 @@ public function crud_files_created_successfully_with_tests(): void public function crud_files_created_successfully_with_customize_from_config_file(): void { config()->set([ - 'laravel-crod.modules.module_namespace' => 'modules', - 'laravel-crod.modules.model_path' => 'Models', - 'laravel-crod.modules.migration_path' => 'Database\Migrations\Test', - 'laravel-crod.modules.controller_path' => 'Http\Controllers\Test', - 'laravel-crod.modules.request_path' => 'Http\Requests\Test', - 'laravel-crod.modules.view_path' => 'Resources\Views\Test', - 'laravel-crod.modules.service_path' => 'Services\Test', - 'laravel-crod.modules.repository_path' => 'Repositories\Test', + 'laravel-crod.modules.module_namespace' => 'modules', + 'laravel-crod.modules.model_path' => 'Models', + 'laravel-crod.modules.migration_path' => 'Database\Migrations\Test', + 'laravel-crod.modules.controller_path' => 'Http\Controllers\Test', + 'laravel-crod.modules.request_path' => 'Http\Requests\Test', + 'laravel-crod.modules.view_path' => 'Resources\Views\Test', + 'laravel-crod.modules.service_path' => 'Services\Test', + 'laravel-crod.modules.repository_path' => 'Repositories\Test', 'laravel-crod.modules.feature_test_path' => 'Tests\Feature\Test', - 'laravel-crod.modules.unit_test_path' => 'Tests\Unit\Test', - 'laravel-crod.modules.provider_path' => 'Providers\Test', - 'laravel-crod.modules.factory_path' => 'Database\Factories\Test', - 'laravel-crod.modules.seeder_path' => 'Database\Seeders\Test', - 'laravel-crod.modules.route_path' => 'Routes\Test', - 'laravel-crod.repository_namespace' => 'Repository' + 'laravel-crod.modules.unit_test_path' => 'Tests\Unit\Test', + 'laravel-crod.modules.provider_path' => 'Providers\Test', + 'laravel-crod.modules.factory_path' => 'Database\Factories\Test', + 'laravel-crod.modules.seeder_path' => 'Database\Seeders\Test', + 'laravel-crod.modules.route_path' => 'Routes\Test', + 'laravel-crod.repository_namespace' => 'Repository', ]); $this->artisan('crud:make-module', ['module_name' => 'Product']) @@ -148,7 +148,7 @@ public function crud_files_created_successfully_with_customize_from_config_file( ->expectsOutput('Crud files successfully generated...'); // Ensure model exists - $this->assertFileExists(base_path("modules/Product/Models/Product.php")); + $this->assertFileExists(base_path('modules/Product/Models/Product.php')); // ensure migration exists $this->migrationExists('create_products_table', 'Modules/Product/Database/Migrations/Test'); @@ -223,4 +223,4 @@ protected function migrationExists(string $mgr, string $path = 'Modules/Product/ return false; } -} \ No newline at end of file +}