1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00

Ignore object-like issue

This commit is contained in:
Matthew Brown 2016-09-21 18:26:26 -04:00
parent 520ca5b559
commit 5d768d4fbe

View File

@ -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',