Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Change the analysis level to the lowest one and fix outstanding errors
Browse files Browse the repository at this point in the history
After this we can bump it one level at the time until all errors are fixed
  • Loading branch information
Sam Stenvall committed Mar 7, 2018
1 parent cd40f28 commit 5381fcd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -13,8 +13,7 @@ before_script:

script:
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml
# Allow phpstan failures until we've fixed the majority of them
- composer analyze || true
- composer analyze

after_success:
- wget https://github.com/php-coveralls/php-coveralls/releases/download/v1.0.1/coveralls.phar -O coveralls.phar
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -42,7 +42,7 @@
"phpunit"
],
"analyze": [
"phpstan analyse -l 7 src/ tests/"
"phpstan analyse -l 1 src/ tests/"
]
},
"autoload-dev": {
Expand Down
12 changes: 6 additions & 6 deletions src/Execution/ExecutionArguments.php
Expand Up @@ -29,7 +29,7 @@ class ExecutionArguments
protected $contextValue;

/**
* @var []
* @var array
*/
protected $variableValues;

Expand All @@ -49,18 +49,18 @@ class ExecutionArguments
* @param DocumentNode $document
* @param mixed $rootValue
* @param mixed $contextValue
* @param $variableValues
* @param array $variableValues
* @param OperationDefinitionNode $operation
* @param mixed $fieldResolver
*/
public function __construct(
Schema $schema,
DocumentNode $document,
mixed $rootValue,
mixed $contextValue,
$variableValues,
$rootValue,
$contextValue,
array $variableValues,
OperationDefinitionNode $operation,
mixed $fieldResolver
$fieldResolver
) {
$this->schema = $schema;
$this->document = $document;
Expand Down
3 changes: 2 additions & 1 deletion src/Language/AST/Schema/DefinitionBuilder.php
Expand Up @@ -28,6 +28,7 @@
use Digia\GraphQL\Type\Definition\ScalarType;
use Digia\GraphQL\Type\Definition\TypeInterface;
use Digia\GraphQL\Type\Definition\UnionType;
use function Digia\GraphQL\Type\introspectionTypes;
use Psr\SimpleCache\CacheInterface;
use function Digia\GraphQL\Execution\getDirectiveValues;
use function Digia\GraphQL\Language\valueFromAST;
Expand Down Expand Up @@ -76,7 +77,7 @@ public function __construct(callable $resolveTypeFunction, CacheInterface $cache
$this->resolveTypeFunction = $resolveTypeFunction;

$builtInTypes = keyMap(
array_merge(specifiedScalarTypes()/*, introspectionTypes()*/),
array_merge(specifiedScalarTypes(), introspectionTypes()),
function (NamedTypeInterface $type) {
return $type->getName();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Language/Parser.php
Expand Up @@ -173,7 +173,7 @@ protected function expectKeyword(LexerInterface $lexer, string $value): Token
return $token;
}

throw new SyntaxError(sprintf('Expected %s, found ${getTokenDesc(token)}', $value, $token));
throw new SyntaxError(sprintf('Expected %s, found %s', $value, $token));
}

/**
Expand Down

0 comments on commit 5381fcd

Please sign in to comment.