diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index deac8c4..373f382 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - php: ['8.1', '8.2', '8.3'] + php: ['8.2', '8.3'] steps: - name: Checkout diff --git a/composer.json b/composer.json index 61000ab..6bc7d04 100644 --- a/composer.json +++ b/composer.json @@ -27,8 +27,8 @@ } ], "require": { - "php": "^8.1", - "ext-fileinfo": "^8.1", + "php": "^8.2", + "ext-fileinfo": "^8.2", "illuminate/support": "^10.0", "illuminate/console": "^10.0", "illuminate/filesystem": "^10.0" diff --git a/src/Actions/NormalizePathAction.php b/src/Actions/NormalizePathAction.php index cd4d90c..3d7ced1 100644 --- a/src/Actions/NormalizePathAction.php +++ b/src/Actions/NormalizePathAction.php @@ -8,7 +8,7 @@ class NormalizePathAction { /** - * @param array|string $path + * @param array|string $path * @return array|string */ public function execute(array|string $path): array|string diff --git a/src/NameResolver.php b/src/NameResolver.php index 1dd33b1..f06103b 100644 --- a/src/NameResolver.php +++ b/src/NameResolver.php @@ -85,8 +85,8 @@ private function init(): void ); $this->path = sprintf( - '%s'.DIRECTORY_SEPARATOR.$this->command->getFileNameTemplate(), - Str::lcfirst(Str::replace('\\', DIRECTORY_SEPARATOR, $this->namespace)), + '%s/'.$this->command->getFileNameTemplate(), + Str::lcfirst(Str::replace('\\', '/', $this->namespace)), $this->className, ); } diff --git a/src/helper.php b/src/helper.php index f8a7202..3c79574 100644 --- a/src/helper.php +++ b/src/helper.php @@ -17,7 +17,7 @@ function beyond_path(): string if (! function_exists('beyond_modules_path')) { function beyond_modules_path(string $path = ''): string { - return base_path('modules'.DIRECTORY_SEPARATOR.$path); + return base_path('modules/'.$path); } } @@ -62,13 +62,11 @@ function beyond_get_choices(string $path): array $fs->ensureDirectoryExists($path); - $directories = array_map( + return array_map( function ($directory) { return last(explode(DIRECTORY_SEPARATOR, $directory)); }, $fs->directories($path) ); - - return $directories; } } diff --git a/stubs/deptrac.yaml b/stubs/deptrac.yaml index 15713d3..e870161 100644 --- a/stubs/deptrac.yaml +++ b/stubs/deptrac.yaml @@ -34,6 +34,12 @@ deptrac: - type: className value: .*\\App\\Controllers\\.* + - + name: Job + collectors: + - + type: className + value: .*\\App\\Jobs\\.* - name: Model collectors: @@ -46,9 +52,17 @@ deptrac: - type: className value: .*\\App\\Processes\\.* + - + name: Query + collectors: + - + type: className + value: .*\\App\\Queries\\.* ruleset: Controller: + - Job - Process + - Query Process: - Action - DataObject @@ -59,4 +73,6 @@ deptrac: Model: - Builder - Collection - Builder: ~ \ No newline at end of file + Builder: ~ + Query: + - Model \ No newline at end of file