Skip to content

Commit 1875d6c

Browse files
committed
Add support for internal classes that overload offset access
1 parent ad4f0c0 commit 1875d6c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Type/ObjectType.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,19 @@ class ObjectType implements TypeWithClassName, SubtractableType
6161
use UndecidedComparisonTypeTrait;
6262
use NonGeneralizableTypeTrait;
6363

64-
private const EXTRA_OFFSET_CLASSES = ['SimpleXMLElement', 'DOMNodeList', 'Threaded'];
64+
private const EXTRA_OFFSET_CLASSES = [
65+
'DOMNamedNodeMap', // Only read and existence
66+
'Dom\NamedNodeMap', // Only read and existence
67+
'DOMNodeList', // Only read and existence
68+
'Dom\NodeList', // Only read and existence
69+
'Dom\HTMLCollection', // Only read and existence
70+
'Dom\DtdNamedNodeMap', // Only read and existence
71+
'PDORow', // Only read and existence
72+
'ResourceBundle', // Only read
73+
'FFI\CData', // Very funky and weird
74+
'SimpleXMLElement',
75+
'Threaded',
76+
];
6577

6678
private ?Type $subtractedType;
6779

0 commit comments

Comments
 (0)