Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Sep 20, 2024
1 parent 39441a6 commit 3eee328
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Traits/QueryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Commands/MakeCrudCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ protected function migrationExists(string $mgr): bool

return false;
}
}
}
32 changes: 16 additions & 16 deletions tests/Commands/Modules/MakeCrudModuleCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand All @@ -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');
Expand Down Expand Up @@ -223,4 +223,4 @@ protected function migrationExists(string $mgr, string $path = 'Modules/Product/

return false;
}
}
}

0 comments on commit 3eee328

Please sign in to comment.