Skip to content

Commit 58002d1

Browse files
jrfnlsirbrillig
authored andcommitted
PHPStan: document run parameters in project ruleset (#122)
This makes it easier to run the PHPStan command for the project. Includes: * Using `%currentWorkingDirectory%` instead of `%rootdir%` * Renaming the file to `phpstan.neon.dist` to allow overloading of the config by individual developers.
1 parent 7dc9a0b commit 58002d1

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"scripts": {
3232
"test": "./vendor/bin/phpunit",
3333
"lint": "./vendor/bin/phpcs",
34-
"phpstan": "./vendor/bin/phpstan analyse -l 7 VariableAnalysis"
34+
"phpstan": "./vendor/bin/phpstan analyse"
3535
},
3636
"require" : {
3737
"php" : ">=5.6.0",

phpstan.neon

Lines changed: 0 additions & 7 deletions
This file was deleted.

phpstan.neon.dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
parameters:
2+
level: 7
3+
autoload_files:
4+
- %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/autoload.php
5+
paths:
6+
- %currentWorkingDirectory%/VariableAnalysis/
7+
excludes_analyse:
8+
- %currentWorkingDirectory%/VariableAnalysis/Tests/
9+
ignoreErrors:
10+
- '~^Constant T_\w+ not found.$~'

0 commit comments

Comments
 (0)