From ec0105773ad93d1b98b997f2925a45f13abc61d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Votruba?= Date: Wed, 29 Nov 2017 14:41:17 +0100 Subject: [PATCH] AbstractList: fix array vs mixed difference ```php /** * @param mixed[] $value */ public function someMethod(array $value) ... ``` is interpretted incorretly like `array`. That matters, because here it is useful - we **know** there is mixed ```php /** * @param array */ public function someMethod(array $value) ... ``` But here not, because we forget to specify the type. And it could be more `SomeType[]`, `string[]` etc. --- src/Types/AbstractList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Types/AbstractList.php b/src/Types/AbstractList.php index ee626604..b9faab26 100644 --- a/src/Types/AbstractList.php +++ b/src/Types/AbstractList.php @@ -82,7 +82,7 @@ public function __toString() } if ($this->valueType instanceof Mixed_) { - return 'array'; + return 'mixed[]'; } if ($this->valueType instanceof Compound) {