Skip to content

Commit 83fef19

Browse files
committed
Remove pass-by-reference for $result in ReferenceExecutor
Follows up on #1776 (comment)
1 parent 93b8210 commit 83fef19

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Executor/ReferenceExecutor.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ protected function completeValue(
864864
ResolveInfo $info,
865865
array $path,
866866
array $unaliasedPath,
867-
&$result,
867+
$result,
868868
$contextValue
869869
) {
870870
// If result is an Error, throw a located error.
@@ -1007,7 +1007,7 @@ protected function completeListValue(
10071007
ResolveInfo $info,
10081008
array $path,
10091009
array $unaliasedPath,
1010-
iterable &$results,
1010+
iterable $results,
10111011
$contextValue
10121012
) {
10131013
$itemType = $returnType->getWrappedType();
@@ -1045,7 +1045,7 @@ protected function completeListValue(
10451045
*
10461046
* @return mixed
10471047
*/
1048-
protected function completeLeafValue(LeafType $returnType, &$result)
1048+
protected function completeLeafValue(LeafType $returnType, $result)
10491049
{
10501050
try {
10511051
return $returnType->serialize($result);
@@ -1079,7 +1079,7 @@ protected function completeAbstractValue(
10791079
ResolveInfo $info,
10801080
array $path,
10811081
array $unaliasedPath,
1082-
&$result,
1082+
$result,
10831083
$contextValue
10841084
) {
10851085
$typeCandidate = $returnType->resolveType($result, $contextValue, $info);
@@ -1213,7 +1213,7 @@ protected function completeObjectValue(
12131213
ResolveInfo $info,
12141214
array $path,
12151215
array $unaliasedPath,
1216-
&$result,
1216+
$result,
12171217
$contextValue
12181218
) {
12191219
// If there is an isTypeOf predicate function, call it with the
@@ -1229,7 +1229,7 @@ protected function completeObjectValue(
12291229
$fieldNodes,
12301230
$path,
12311231
$unaliasedPath,
1232-
&$result
1232+
$result
12331233
) {
12341234
if (! $isTypeOfResult) {
12351235
throw $this->invalidReturnTypeError($returnType, $result, $fieldNodes);
@@ -1296,7 +1296,7 @@ protected function collectAndExecuteSubfields(
12961296
\ArrayObject $fieldNodes,
12971297
array $path,
12981298
array $unaliasedPath,
1299-
&$result,
1299+
$result,
13001300
$contextValue
13011301
) {
13021302
$subFieldNodes = $this->collectSubFields($returnType, $fieldNodes);
@@ -1444,7 +1444,7 @@ protected function ensureValidRuntimeType(
14441444
$runtimeTypeOrName,
14451445
AbstractType $returnType,
14461446
ResolveInfo $info,
1447-
&$result
1447+
$result
14481448
): ObjectType {
14491449
$runtimeType = is_string($runtimeTypeOrName)
14501450
? $this->exeContext->schema->getType($runtimeTypeOrName)

0 commit comments

Comments
 (0)