From a502c3325480aa506a83b519f578e868fcb92d82 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Wed, 10 Jul 2019 17:46:07 +0300 Subject: [PATCH] Upgrade PHPStan to 0.11.12 --- composer.json | 2 +- src/Utils/BuildSchema.php | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index b688618..918cbca 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Utils/BuildSchema.php b/src/Utils/BuildSchema.php index 3039aef..1aa4f68 100644 --- a/src/Utils/BuildSchema.php +++ b/src/Utils/BuildSchema.php @@ -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();