From dff23e9d74d5d80fff50ef116ef0da1da38a62c2 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Thu, 15 Sep 2016 16:42:50 -0400 Subject: [PATCH] Be more general with arrays --- src/Psalm/Type.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Psalm/Type.php b/src/Psalm/Type.php index 214cda3bd..c980423ec 100644 --- a/src/Psalm/Type.php +++ b/src/Psalm/Type.php @@ -82,10 +82,7 @@ abstract class Type $generic_type_value = self::fixScalarTerms($generic_type->value); if ($generic_type_value === 'array' && count($generic_params) === 1) { - array_unshift($generic_params, new Union([ - new Atomic('int'), - new Atomic('string') - ])); + array_unshift($generic_params, Type::getMixed()); } if (!$generic_params) { @@ -221,10 +218,7 @@ abstract class Type $type = new Generic( 'array', [ - new Union([ - new Atomic('int'), - new Atomic('string') - ]), + Type::getMixed(), Type::getMixed() ] );