diff --git a/.gitignore b/.gitignore index f18b445..33caefd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,49 @@ -.idea -.phpunit.cache -build +# Composer Related composer.lock -coverage -docs +/vendor + +# Frontend Assets +/node_modules + +# Logs +npm-debug.log +yarn-error.log + +# Caches +.phpunit.cache +.phpunit.result.cache +/build + +# IDE Helper +_ide_helper.php +_ide_helper_models.php +.phpstorm.meta.php + +# Editors +/.idea +/.fleet +/.vscode + +# Misc phpunit.xml phpstan.neon testbench.yaml -node_modules +/docs +/coverage +build +coverage +docs /.phpunit.cache -/node_modules -/public/hot -/public/storage -/storage/*.key -/vendor .env .env.backup .env.production -.phpunit.result.cache -.editorconfig Homestead.json Homestead.yaml auth.json -npm-debug.log -yarn-error.log -/.fleet -/.idea -/.vscode .user.ini php.ini error_log .DS_Store +/.DS_Store +/storage/**/* .php-cs-fixer.cache diff --git a/composer.json b/composer.json index 0ce5e37..ad08917 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^8.3||^8.2", + "php": "^8.3", "spatie/laravel-package-tools": "^1.16", "illuminate/contracts": "^10.0||^11.0||^12.0" }, @@ -28,7 +28,9 @@ "orchestra/testbench": "^10.2||^9.0.0||^8.22.0", "pestphp/pest": "^3.0||^2.34", "pestphp/pest-plugin-arch": "^3.0||^2.7", - "pestphp/pest-plugin-laravel": "^3.2||^2.3" + "pestphp/pest-plugin-laravel": "^3.2||^2.3", + "rector/rector": "^2.0", + "driftingly/rector-laravel": "^2.0" }, "autoload": { "psr-4": { diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..070a210 --- /dev/null +++ b/rector.php @@ -0,0 +1,48 @@ +paths([ + __DIR__.'/src', + __DIR__.'/config', + __DIR__.'/database', + __DIR__.'/resources', + __DIR__.'/storage', + __DIR__.'/tests', + ]); + + // Skip specific rules + $rectorConfig->skip([ + CompactToVariablesRector::class, + ]); + + // Enable caching for Rector + $rectorConfig->cacheDirectory(__DIR__.'/storage/rector'); + $rectorConfig->cacheClass(FileCacheStorage::class); + + // Apply sets for Laravel and general code quality + $rectorConfig->sets([ + LaravelLevelSetList::UP_TO_LARAVEL_110, + SetList::TYPE_DECLARATION, + SetList::PRIVATIZATION, + SetList::CODE_QUALITY, + SetList::CODING_STYLE, + SetList::EARLY_RETURN, + SetList::INSTANCEOF, + SetList::DEAD_CODE, + SetList::NAMING, + SetList::PHP_84, + ]); + + // Define PHP version for Rector + $rectorConfig->phpVersion(PhpVersion::PHP_84); +}; diff --git a/resources/views/components/buttons/fake-button.blade.php b/resources/views/components/buttons/fake-button.blade.php index 5e7c922..b90894d 100644 --- a/resources/views/components/buttons/fake-button.blade.php +++ b/resources/views/components/buttons/fake-button.blade.php @@ -1,3 +1,3 @@ - diff --git a/resources/views/components/buttons/location-button.blade.php b/resources/views/components/buttons/location-button.blade.php index 9e9ff7c..b5b9c1a 100644 --- a/resources/views/components/buttons/location-button.blade.php +++ b/resources/views/components/buttons/location-button.blade.php @@ -2,6 +2,6 @@ class="sr-only peer" wire:model="location"> diff --git a/resources/views/components/buttons/next-button.blade.php b/resources/views/components/buttons/next-button.blade.php index 567e37f..52a893c 100644 --- a/resources/views/components/buttons/next-button.blade.php +++ b/resources/views/components/buttons/next-button.blade.php @@ -1,4 +1,4 @@ diff --git a/resources/views/components/buttons/submit-button.blade.php b/resources/views/components/buttons/submit-button.blade.php index 20a7946..2a07330 100644 --- a/resources/views/components/buttons/submit-button.blade.php +++ b/resources/views/components/buttons/submit-button.blade.php @@ -1,6 +1,6 @@