Skip to content

Commit 6d16eb5

Browse files
committed
Fix errors from Travis
1 parent f988242 commit 6d16eb5

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ includes:
33

44
parameters:
55
level: 7
6-
reportUnmatchedIgnoredErrors: true
6+
reportUnmatchedIgnoredErrors: false
77
checkMissingIterableValueType: false
88
checkGenericClassInNonGenericObjectType: false
99
paths:

src/Error/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function createErrorFormatter(bool $debug = false): Closure
6060
return function (GraphQLError $error) use ($debugMode): array {
6161
$event = new ErrorFormattingEvent($error, FormattedError::createFromException($error, $debugMode, $this->internalErrorMessage));
6262

63-
$this->dispatcher->dispatch($event, Events::ERROR_FORMATTING);
63+
$this->dispatcher->dispatch($event, Events::ERROR_FORMATTING); // @phpstan-ignore-line
6464

6565
return $event->getFormattedError()->getArrayCopy();
6666
};

src/Request/Executor.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use GraphQL\Validator\Rules\DisableIntrospection;
1515
use GraphQL\Validator\Rules\QueryComplexity;
1616
use GraphQL\Validator\Rules\QueryDepth;
17+
use Overblog\GraphQLBundle\Definition\Type\ExtensibleSchema;
1718
use Overblog\GraphQLBundle\Event\Events;
1819
use Overblog\GraphQLBundle\Event\ExecutorArgumentsEvent;
1920
use Overblog\GraphQLBundle\Event\ExecutorContextEvent;
@@ -168,16 +169,17 @@ private function preExecute(
168169
?array $variableValue = null,
169170
?string $operationName = null
170171
): ExecutorArgumentsEvent {
171-
$this->dispatcher->dispatch(
172-
new ExecutorContextEvent($contextValue),
173-
Events::EXECUTOR_CONTEXT
174-
);
175-
176172
// @phpstan-ignore-next-line
177-
return $this->dispatcher->dispatch(
173+
$this->dispatcher->dispatch(new ExecutorContextEvent($contextValue), Events::EXECUTOR_CONTEXT);
174+
175+
/** @var ExecutorArgumentsEvent $object */
176+
$object = $this->dispatcher->dispatch(
177+
/** @var ExtensibleSchema $schema */
178178
ExecutorArgumentsEvent::create($schema, $requestString, $contextValue, $rootValue, $variableValue, $operationName),
179179
Events::PRE_EXECUTOR
180180
);
181+
182+
return $object;
181183
}
182184

183185
private function postExecute(ExecutionResult $result): ExecutionResult

src/Resolver/TypeResolver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function setCurrentSchemaName(?string $currentSchemaName): void
3636
protected function onLoadSolution($solution): void
3737
{
3838
if (isset($this->dispatcher)) {
39+
// @phpstan-ignore-next-line
3940
$this->dispatcher->dispatch(new TypeLoadedEvent($solution, $this->currentSchemaName), Events::TYPE_LOADED);
4041
}
4142
}

src/Validator/ValidatorFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function createValidator(MetadataFactory $metadataFactory): ValidatorInte
2828
->setConstraintValidatorFactory($this->constraintValidatorFactory);
2929

3030
if (null !== $this->defaultTranslator) {
31-
$builder
31+
$builder // @phpstan-ignore-line
3232
->setTranslator($this->defaultTranslator)
3333
->setTranslationDomain('validators');
3434
}

0 commit comments

Comments
 (0)