Skip to content

Commit e3bc588

Browse files
Autofix
1 parent 6782bad commit e3bc588

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

docs/class-reference.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ static function executeQuery(
7070
?array $variableValues = null,
7171
?string $operationName = null,
7272
?callable $fieldResolver = null,
73-
?array $validationRules = null
73+
?array $validationRules = null,
74+
?Psr\SimpleCache\CacheInterface $cache = null
7475
): GraphQL\Executor\ExecutionResult
7576
```
7677

@@ -98,7 +99,8 @@ static function promiseToExecute(
9899
?array $variableValues = null,
99100
?string $operationName = null,
100101
?callable $fieldResolver = null,
101-
?array $validationRules = null
102+
?array $validationRules = null,
103+
?Psr\SimpleCache\CacheInterface $cache = null
102104
): GraphQL\Executor\Promise\Promise
103105
```
104106

@@ -1811,7 +1813,8 @@ static function validate(
18111813
GraphQL\Type\Schema $schema,
18121814
GraphQL\Language\AST\DocumentNode $ast,
18131815
?array $rules = null,
1814-
?GraphQL\Utils\TypeInfo $typeInfo = null
1816+
?GraphQL\Utils\TypeInfo $typeInfo = null,
1817+
?Psr\SimpleCache\CacheInterface $cache = null
18151818
): array
18161819
```
18171820

src/Validator/DocumentValidator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ public static function validate(
113113
if ($cache->has($cacheKey)) {
114114
return $cache->get($cacheKey);
115115
}
116-
} catch (InvalidArgumentException $e) {}
116+
} catch (InvalidArgumentException $e) {
117+
}
117118
}
118119

119120
$rules ??= static::allRules();
@@ -144,7 +145,8 @@ public static function validate(
144145
if (isset($cacheKey) && count($errors) === 0) {
145146
$cache->set($cacheKey, $errors);
146147
}
147-
} catch (InvalidArgumentException $e) {}
148+
} catch (InvalidArgumentException $e) {
149+
}
148150

149151
return $errors;
150152
}

0 commit comments

Comments
 (0)