Skip to content

Commit

Permalink
PHPStan: document run parameters in project ruleset (#122)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrfnl authored and sirbrillig committed Jan 20, 2020
1 parent 7dc9a0b commit 58002d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"scripts": {
"test": "./vendor/bin/phpunit",
"lint": "./vendor/bin/phpcs",
"phpstan": "./vendor/bin/phpstan analyse -l 7 VariableAnalysis"
"phpstan": "./vendor/bin/phpstan analyse"
},
"require" : {
"php" : ">=5.6.0",
Expand Down
7 changes: 0 additions & 7 deletions phpstan.neon

This file was deleted.

10 changes: 10 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
level: 7
autoload_files:
- %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/autoload.php
paths:
- %currentWorkingDirectory%/VariableAnalysis/
excludes_analyse:
- %currentWorkingDirectory%/VariableAnalysis/Tests/
ignoreErrors:
- '~^Constant T_\w+ not found.$~'

0 comments on commit 58002d1

Please sign in to comment.