Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fcdfa63

Browse files
committed
Add support for internal classes that overload offset access
1 parent ecdd6c6 commit fcdfa63

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
@@ -67,7 +67,19 @@ class ObjectType implements TypeWithClassName, SubtractableType
6767
use UndecidedComparisonTypeTrait;
6868
use NonGeneralizableTypeTrait;
6969

70-
private const EXTRA_OFFSET_CLASSES = ['SimpleXMLElement', 'DOMNodeList', 'Threaded'];
70+
private const EXTRA_OFFSET_CLASSES = [
71+
'DOMNamedNodeMap', // Only read and existence
72+
'Dom\NamedNodeMap', // Only read and existence
73+
'DOMNodeList', // Only read and existence
74+
'Dom\NodeList', // Only read and existence
75+
'Dom\HTMLCollection', // Only read and existence
76+
'Dom\DtdNamedNodeMap', // Only read and existence
77+
'PDORow', // Only read and existence
78+
'ResourceBundle', // Only read
79+
'FFI\CData', // Very funky and weird
80+
'SimpleXMLElement',
81+
'Threaded',
82+
];
7183

7284
private ?Type $subtractedType;
7385

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /