diff --git a/.github/workflows/testing-pull-request.yaml b/.github/workflows/testing-pull-request.yaml new file mode 100644 index 0000000..4f8ab5e --- /dev/null +++ b/.github/workflows/testing-pull-request.yaml @@ -0,0 +1,23 @@ +name: Testing Pull Request +on: + pull_request: + types: [synchronize, opened, reopened] +jobs: + pint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: src + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup PHP with composer v2 + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + tools: composer:v2 + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction --no-scripts --no-ansi + - name: Pint Testing + run: ./vendor/bin/pint -v --test diff --git a/src/.gitignore b/src/.gitignore index 7fe978f..275a84c 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,4 +1,5 @@ /.phpunit.cache +/.pint.cache /node_modules /public/build /public/hot diff --git a/src/pint.json b/src/pint.json new file mode 100644 index 0000000..9b85ef3 --- /dev/null +++ b/src/pint.json @@ -0,0 +1,32 @@ +{ + "preset": "laravel", + "cache-file": ".pint.cache", + "exclude": [ + "database/migrations" + ], + "rules": { + "concat_space": false, + "date_time_immutable": true, + "declare_parentheses": true, + "declare_strict_types": true, + "final_class": true, + "global_namespace_import": { + "import_classes": true, + "import_constants": true, + "import_functions": true + }, + "mb_str_functions": true, + "new_with_braces": true, + "no_superfluous_phpdoc_tags": true, + "not_operator_with_successor_space": true, + "phpdoc_align": { + "align": "left" + }, + "phpdoc_separation": false, + "php_unit_test_case_static_method_calls": { + "call_type": "this" + }, + "simplified_if_return": true, + "simplified_null_return": true + } +}