From 8ae289c789b92583bf6eb8745bff186b0a53fcc2 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 14 Apr 2020 15:53:22 +0800 Subject: [PATCH] Added phpstan config file --- README.md | 2 +- composer.json | 2 +- phpstan.neon | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 phpstan.neon diff --git a/README.md b/README.md index 843dd54..79fd9a6 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ composer test ## Static Analysis -Execute [phpstan](https://github.com/phpstan/phpstan) with level 8 (strictest mode): +Execute [phpstan](https://github.com/phpstan/phpstan) with level 5: ``` bash composer analyse diff --git a/composer.json b/composer.json index 30c79a2..e6917a4 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "test": "phpunit", "check-style": "phpcs src tests", "fix-style": "phpcbf src tests", - "analyse": "phpstan analyse -l 8 src tests" + "analyse": "phpstan analyse -c phpstan.neon" }, "extra": { "branch-alias": { diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..592b6b6 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,6 @@ +parameters: + level: 5 + paths: + - src + - tests + \ No newline at end of file