diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..1b3ce23f --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,16 @@ +name: PHP Lint CI +on: + push: + branches: + - master + pull_request: + workflow_dispatch: +jobs: + php-cs-fixer: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: PHP-CS-Fixer + uses: docker://oskarstark/php-cs-fixer-ga + with: + args: --diff --dry-run diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 00000000..2d2341bc --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,15 @@ +setRules([ + '@PSR2' => true, + 'concat_space' => ['spacing' => 'one'], + 'no_unused_imports' => true, + 'method_argument_space' => false, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__) + ->exclude(__DIR__.'/vendor') + ) +;