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 c9429bc commit 3a22566
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -30,7 +30,7 @@ before_script:
script:
- "! (composer outdated --direct | grep ^)"
- if php -v | grep -q 'PHP 7'; then vendor-tools/bin/php-cs-fixer fix --dry-run; fi
- if php -v | grep -q 'PHP 7'; then vendor-tools/bin/phpstan analyse --level=5 --configuration=phpstan.neon src tests; fi
- if php -v | grep -q 'PHP 7'; then vendor-tools/bin/phpstan analyse --level=7 --configuration=phpstan.neon src tests; fi
- vendor/bin/codecept run $coverage

after_success:
Expand Down
6 changes: 3 additions & 3 deletions composer-tools.json
@@ -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
Expand Up @@ -51,7 +51,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
3 changes: 3 additions & 0 deletions phpstan.neon
Expand Up @@ -6,3 +6,6 @@ parameters:
ignoreErrors:
- '#^Access to an undefined property Eloquent\\Phony\\Mock\\Handle\\InstanceHandle::\$[a-zA-Z]++#'
- '#^Parameter \#[0-9]++ \$[a-zA-Z]++ of method [a-zA-Z\\:]++\(\) expects [a-zA-Z\\]++, Eloquent\\Phony\\Mock\\Mock given#'

excludes_analyse:
- %rootDir%/../../../tests/_helpers/*
12 changes: 6 additions & 6 deletions src/Rules/PrivilegeRuleHandler.php
Expand Up @@ -39,9 +39,9 @@ public function __construct(callable $authorizatorResolver, PropertyAccessorInte
}

/**
* @param Privilege $rule
* @param Request $request
* @param string $component
* @param Privilege $rule
* @param Request $request
* @param string|null $component
*
* @throws VerificationException
*/
Expand All @@ -65,9 +65,9 @@ public function checkRule(RuleInterface $rule, Request $request, $component = nu
}

/**
* @param string $resource
* @param Request $request
* @param string $component
* @param string $resource
* @param Request $request
* @param string|null $component
*
* @return string|IResource
*/
Expand Down

0 comments on commit 3a22566

Please sign in to comment.