Skip to content

Commit

Permalink
run phpstan on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adaamz committed Dec 9, 2019
1 parent 120c713 commit ceeded4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ script:
- if [[ $XMLLINT == "1" ]]; then diff -B ./src/Standards/Squiz/ruleset.xml <(xmllint --format "./src/Standards/Squiz/ruleset.xml"); fi
- if [[ $XMLLINT == "1" ]]; then diff -B ./src/Standards/Zend/ruleset.xml <(xmllint --format "./src/Standards/Zend/ruleset.xml"); fi
# Run PHPStan
- if [[ $PHPSTAN == "1" ]]; then composer require --dev phpstan/phpstan && php vendor/bin/phpstan analyse --configuration=phpstan.neon; fi
- if [[ $PHPSTAN == "1" ]]; then composer require --dev phpstan/phpstan phpstan/phpstan-phpunit && php vendor/bin/phpstan analyse --configuration=phpstan.neon && php vendor/bin/phpstan analyse --configuration=phpstan.tests.neon; fi
25 changes: 25 additions & 0 deletions phpstan.tests.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
parameters:
level: 1
paths:
- tests/Core
- tests/Standards
autoload_files:
- tests/bootstrap.php
ignoreErrors:
-
count: 1
message: '~^Method PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest::getErrorList\(\) invoked with 1 parameter, 0 required\.$~'
path: /tests/Standards/AbstractSniffUnitTest.php
-
count: 1
message: '~^Method PHP_CodeSniffer\\Tests\\Standards\\AbstractSniffUnitTest::getWarningList\(\) invoked with 1 parameter, 0 required\.$~'
path: /tests/Standards/AbstractSniffUnitTest.php

dynamicConstantNames:
- PHP_CODESNIFFER_IN_TESTS
- PHP_CODESNIFFER_CBF
- PHP_CODESNIFFER_VERBOSITY

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon

0 comments on commit ceeded4

Please sign in to comment.