20
20
* path?: array<int, int|string>,
21
21
* extensions?: array<string, mixed>
22
22
* }
23
- * @phpstan-type SerializableErrors array<int, SerializableError>
23
+ * @phpstan-type SerializableErrors list< SerializableError>
24
24
* @phpstan-type SerializableResult array{
25
25
* data?: array<string, mixed>,
26
26
* errors?: SerializableErrors,
27
27
* extensions?: array<string, mixed>
28
28
* }
29
29
* @phpstan-type ErrorFormatter callable(\Throwable): SerializableError
30
- * @phpstan-type ErrorsHandler callable(array <Error> $errors, ErrorFormatter $formatter): SerializableErrors
30
+ * @phpstan-type ErrorsHandler callable(list <Error> $errors, ErrorFormatter $formatter): SerializableErrors
31
31
*
32
32
* @see \GraphQL\Tests\Executor\ExecutionResultTest
33
33
*/
@@ -50,7 +50,7 @@ class ExecutionResult implements \JsonSerializable
50
50
*
51
51
* @api
52
52
*
53
- * @var array <Error>
53
+ * @var list <Error>
54
54
*/
55
55
public array $ errors = [];
56
56
@@ -79,7 +79,7 @@ class ExecutionResult implements \JsonSerializable
79
79
80
80
/**
81
81
* @param array<string, mixed>|null $data
82
- * @param array <Error> $errors
82
+ * @param list <Error> $errors
83
83
* @param array<string, mixed> $extensions
84
84
*/
85
85
public function __construct (?array $ data = null , array $ errors = [], array $ extensions = [])
0 commit comments