Skip to content

Commit f9f7552

Browse files
committed
Fix code coverage
1 parent 82007b2 commit f9f7552

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/Config/TypeDefinition.php

-9
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,6 @@ protected function callbackSection(string $name, string $info): ArrayNodeDefinit
215215
->ifTrue(fn ($options) => is_string($options) && !ExpressionLanguage::stringHasTrigger($options))
216216
->then(fn ($options) => ['method' => $options])
217217
->end()
218-
->beforeNormalization()
219-
// clean expression
220-
->ifTrue(fn ($options) => isset($options['expression']) && is_string($options['expression']) && ExpressionLanguage::stringHasTrigger($options['expression']))
221-
->then(function ($options) {
222-
$options['expression'] = ExpressionLanguage::unprefixExpression($options['expression']);
223-
224-
return $options;
225-
})
226-
->end()
227218
->children()
228219
->scalarNode('method')->end()
229220
->scalarNode('expression')->end()

src/Generator/TypeBuilder.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -887,11 +887,8 @@ private function buildCallback(Callback $callback, array $argNames, ?callable $e
887887
}
888888
} elseif (null !== $callback->id) {
889889
$fn = "$this->gqlServices->get('$callback->id')";
890-
if ($callback->method) {
891-
return Collection::numeric([$fn, $callback->method]);
892-
} else {
893-
return Literal::new($fn);
894-
}
890+
891+
return Collection::numeric([$fn, $callback->method ?? '__invoke']);
895892
} else {
896893
return Literal::new("'$callback->method'");
897894
}

0 commit comments

Comments
 (0)