diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000..d913573 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,28 @@ +name: "Static Analysis" + +on: + pull_request: + branches: + - "master" + paths: + - .github/workflows/static-analysis.yml + - composer.* + - lib/** + - phpstan* + - psalm* + - tests + push: + branches: + - "master" + paths: + - .github/workflows/static-analysis.yml + - composer.* + - lib/** + - phpstan* + - psalm* + - tests + +jobs: + static-analysis: + name: "Static Analysis" + uses: "doctrine/.github/.github/workflows/static-analysis.yml@3.0.0" diff --git a/composer.json b/composer.json index c79e38c..96c027d 100644 --- a/composer.json +++ b/composer.json @@ -8,9 +8,11 @@ "php": "^7.1|^8.0" }, "require-dev": { + "doctrine/coding-standard": "^9", "phpunit/phpunit": "^7.5|^8.5|^9.5", + "phpstan/phpstan": "1.4.10 || 1.10.15", "psr/log": "^1|^2|^3", - "doctrine/coding-standard": "^9" + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..0c704b8 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,5 @@ +parameters: + level: 3 + paths: + - lib + - tests diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..f18a886 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,17 @@ + + + + + + + + +