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:
parent
520ca5b559
commit
5d768d4fbe
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user