You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpfunctiontakesAnInt(DOMElement$e): ?DOMAttr {
if ($e->hasAttributes()) {
return$e->attributes[0];
}
returnnull;
}
Psalm output (using commit 765dcbf):
ERROR: UndefinedMethod - 5:16 - Method DOMNamedNodeMap::offsetGet does not exist
INFO: MixedReturnStatement - 5:16 - Could not infer a return type
Similar to phpstan/phpstan#12235.
Some internal classes do not implement
ArrayAccess
but allow accessing offsets regardless.This would be fixed on the PHP side with https://wiki.php.net/rfc/container-offset-behaviour
The text was updated successfully, but these errors were encountered: