Skip to content

Commit bf90bae

Browse files
authored
Merge pull request #1029 from ktrzos/root-value-fix
Fixed `rootValue` typing in `ExecutorArgumentsEvent` class.
2 parents 6c8ef54 + deeb52d commit bf90bae

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/Event/ExecutorArgumentsEvent.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,21 @@ final class ExecutorArgumentsEvent extends Event
1818
private ?array $variableValue = null;
1919
private ?string $operationName = null;
2020
private ?float $startTime = null;
21-
22-
/** @var mixed */
23-
private $rootValue;
21+
private mixed $rootValue;
2422

2523
/**
26-
* @param mixed|null $rootValue
27-
*
2824
* @return static
2925
*/
3026
public static function create(
3127
string $schemaName,
3228
ExtensibleSchema $schema,
3329
string $requestString,
3430
ArrayObject $contextValue,
35-
$rootValue = null,
31+
mixed $rootValue = null,
3632
array $variableValue = null,
3733
string $operationName = null
3834
): self {
39-
$instance = new static();
35+
$instance = new self();
4036
$instance->setSchemaName($schemaName);
4137
$instance->setSchema($schema);
4238
$instance->setRequestString($requestString);
@@ -64,10 +60,7 @@ public function setContextValue(ArrayObject $contextValue): void
6460
$this->contextValue = $contextValue;
6561
}
6662

67-
/**
68-
* @param mixed $rootValue
69-
*/
70-
public function setRootValue($rootValue = null): void
63+
public function setRootValue(mixed $rootValue = null): void
7164
{
7265
$this->rootValue = $rootValue;
7366
}
@@ -107,7 +100,7 @@ public function getRequestString(): string
107100
return $this->requestString;
108101
}
109102

110-
public function getRootValue(): ?array
103+
public function getRootValue(): mixed
111104
{
112105
return $this->rootValue;
113106
}

0 commit comments

Comments
 (0)