From 2fbf3c0e692e66f12a55e33b44d857413e5c8448 Mon Sep 17 00:00:00 2001 From: Michael Traver Date: Tue, 9 Mar 2021 18:40:20 -0800 Subject: [PATCH 1/2] chore: add lint workflow --- .github/workflows/lint.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/lint.yaml 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 From 247f095296efe9a83f022562e125a0683286a21d Mon Sep 17 00:00:00 2001 From: Michael Traver Date: Tue, 9 Mar 2021 18:48:36 -0800 Subject: [PATCH 2/2] Add php_cs config file --- .php_cs.dist | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .php_cs.dist 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') + ) +;