Skip to content

Commit

Permalink
Update phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Jul 15, 2017
1 parent 3d80771 commit ea4afe2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_script:
script:
- "! (composer outdated --direct | grep ^)"
- vendor-tools/bin/php-cs-fixer fix --dry-run
- vendor-tools/bin/phpstan analyse --level=5 --configuration=phpstan.neon src tests
- vendor-tools/bin/phpstan analyse --level=7 --configuration=phpstan.neon src tests
- vendor/bin/codecept run $coverage

after_success:
Expand Down
6 changes: 3 additions & 3 deletions composer-tools.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0.0",
"phpstan/phpstan": "^0.6.3",
"phpstan/phpstan-nette": "^0.6.1"
"friendsofphp/php-cs-fixer": "@stable",
"phpstan/phpstan": "@stable",
"phpstan/phpstan-nette": "@stable"
},
"config": {
"vendor-dir": "vendor-tools"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@test"
],
"fix": "\"vendor-tools/bin/php-cs-fixer\" fix",
"analyse": "\"vendor-tools/bin/phpstan\" analyse --no-progress --level=5 --configuration=phpstan.neon src tests",
"analyse": "\"vendor-tools/bin/phpstan\" analyse --no-progress --level=7 --configuration=phpstan.neon src tests",
"test": [
"\"vendor/bin/codecept\" build",
"\"vendor/bin/codecept\" run --debug"
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ includes:
- vendor-tools/phpstan/phpstan-nette/rules.neon

parameters:
excludes_analyse:
- %rootDir%/../../../tests/_*

ignoreErrors:
- '#^Access to an undefined property Eloquent\\Phony\\Mock\\Handle\\InstanceHandle::\$[a-zA-Z]++#'
- '#^Parameter \#[0-9]++ \$[a-zA-Z]++ of class [a-zA-Z\\]++ constructor expects [a-zA-Z\\]++, Eloquent\\Phony\\Mock\\Mock given#'
- '#^Parameter \$[a-zA-Z]++ of method Tests\\Unit\\Classes\\[a-zA-Z]++::[a-zA-Z]++\(\) has invalid typehint type Tests\\Unit\\Classes\\[a-zA-Z0-9]++#'
- '#^Property Tests\\Unit\\Classes\\[a-zA-Z]++::\$[a-zA-Z0-9]++ has unknown class Tests\\Unit\\Classes\\[a-zA-Z0-9]++ as its type#'
- '#^Return typehint of method Tests\\Unit\\Classes\\TestPresenter::createComponentNonexistentComponent\(\) has invalid type Tests\\Unit\\Classes\\NonexistentComponent#'
- '#^Parameter \#1 \$reflection of method Arachne\\EntityLoader\\Application\\ParameterFinder::[a-zA-Z]++\(\) expects [a-zA-Z\\]++, Nette\\Application\\UI\\[a-zA-Z]+Reflection\|null given#'
- '#^Calling method [a-zA-Z]++\(\) on possibly nullable type Nette\\Application\\UI\\[a-zA-Z]+Reflection\|null#'

0 comments on commit ea4afe2

Please sign in to comment.