Upgrade PHPStan to 0.11.12

This commit is contained in:
Simon Podlipsky 2019-07-10 17:46:07 +03:00
parent 22a0da9b98
commit a502c33254
2 changed files with 10 additions and 7 deletions

View File

@ -16,7 +16,7 @@
"require-dev": {
"doctrine/coding-standard": "^6.0",
"phpbench/phpbench": "^0.14.0",
"phpstan/phpstan": "^0.11.8",
"phpstan/phpstan": "^0.11.12",
"phpstan/phpstan-phpunit": "^0.11.2",
"phpstan/phpstan-strict-rules": "^0.11.1",
"phpunit/phpcov": "^5.0",

View File

@ -159,9 +159,10 @@ class BuildSchema
// If specified directives were not explicitly declared, add them.
$skip = array_reduce(
$directives,
static function ($hasSkip, $directive) {
static function (bool $hasSkip, Directive $directive) : bool {
return $hasSkip || $directive->name === 'skip';
}
},
false
);
if (! $skip) {
$directives[] = Directive::skipDirective();
@ -169,9 +170,10 @@ class BuildSchema
$include = array_reduce(
$directives,
static function ($hasInclude, $directive) {
static function (bool $hasInclude, Directive $directive) : bool {
return $hasInclude || $directive->name === 'include';
}
},
false
);
if (! $include) {
$directives[] = Directive::includeDirective();
@ -179,9 +181,10 @@ class BuildSchema
$deprecated = array_reduce(
$directives,
static function ($hasDeprecated, $directive) {
static function (bool $hasDeprecated, Directive $directive) : bool {
return $hasDeprecated || $directive->name === 'deprecated';
}
},
false
);
if (! $deprecated) {
$directives[] = Directive::deprecatedDirective();