Skip to content

Instantly share code, notes, and snippets.

@mhujer
Created February 22, 2018 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhujer/c8ea6f882dfbfce183e21ecc8d2041b7 to your computer and use it in GitHub Desktop.
Save mhujer/c8ea6f882dfbfce183e21ecc8d2041b7 to your computer and use it in GitHub Desktop.
Enable PHPStan in PHPUnit
diff --git a/composer.json b/composer.json
index d1d0595e5..6b04dc677 100644
--- a/composer.json
+++ b/composer.json
@@ -47,7 +47,8 @@
"sebastian/version": "^2.0.1"
},
"require-dev": {
- "ext-PDO": "*"
+ "ext-PDO": "*",
+ "phpstan/phpstan": "^0.9"
},
"config": {
"platform": {
@@ -79,6 +80,10 @@
"tests/_files/NamespaceCoveredFunction.php"
]
},
+ "scripts": {
+ "phpstan": "phpstan analyse --level=0 -c phpstan.neon src",
+ "phpstan-tests": "phpstan analyse --level=0 -c phpstan-tests.neon tests"
+ },
"extra": {
"branch-alias": {
"dev-master": "7.1-dev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment