From 5d768d4fbe75a6c3af9e869c42339e99e4f44f54 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Wed, 21 Sep 2016 18:26:26 -0400 Subject: [PATCH] Ignore object-like issue --- src/Psalm/Checker/StatementsChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Checker/StatementsChecker.php b/src/Psalm/Checker/StatementsChecker.php index 2b0c9fbc9..5bc0c2ffd 100644 --- a/src/Psalm/Checker/StatementsChecker.php +++ b/src/Psalm/Checker/StatementsChecker.php @@ -2372,7 +2372,7 @@ class StatementsChecker return; } - if ($type->value !== 'array' && !ClassChecker::classImplements($type->value, 'ArrayAccess')) { + if (!$type->isArray() && !$type->isObjectLike() && !ClassChecker::classImplements($type->value, 'ArrayAccess')) { if (IssueBuffer::accepts( new InvalidArrayAssignment( 'Cannot assign value on variable $' . $var_id . ' of type ' . $type->value . ' that does not implement ArrayAccess',