Skip to content

Commit 9bd59d7

Browse files
committed
Update stubs
1 parent 5a2c168 commit 9bd59d7

18 files changed

+261
-61
lines changed

stubs/ext/dom/Dom/Attr.php

+26-7
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,38 @@
55
#[\Since('8.4')]
66
class Attr extends \Dom\Node
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public ?string $namespaceURI;
10-
/** @readonly */
13+
/**
14+
* @readonly
15+
* @virtual
16+
*/
1117
public ?string $prefix;
12-
/** @readonly */
18+
/**
19+
* @readonly
20+
* @virtual
21+
*/
1322
public string $localName;
14-
/** @readonly */
23+
/**
24+
* @readonly
25+
* @virtual
26+
*/
1527
public string $name;
28+
/** @virtual */
1629
public string $value;
17-
/** @readonly */
30+
/**
31+
* @readonly
32+
* @virtual
33+
*/
1834
public ?Element $ownerElement;
19-
/** @readonly */
20-
public bool $specified = true;
35+
/**
36+
* @readonly
37+
* @virtual
38+
*/
39+
public bool $specified;
2140
/** @implementation-alias DOMAttr::isId */
2241
public function isId(): bool
2342
{

stubs/ext/dom/Dom/CharacterData.php

+13-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@
55
#[\Since('8.4')]
66
class CharacterData extends \Dom\Node implements \Dom\ChildNode
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public ?Element $previousElementSibling;
10-
/** @readonly */
13+
/**
14+
* @readonly
15+
* @virtual
16+
*/
1117
public ?Element $nextElementSibling;
18+
/** @virtual */
1219
public string $data;
13-
/** @readonly */
20+
/**
21+
* @readonly
22+
* @virtual
23+
*/
1424
public int $length;
1525
/** @implementation-alias DOMCharacterData::substringData */
1626
public function substringData(int $offset, int $count): string

stubs/ext/dom/Dom/Document.php

+31-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,25 @@ abstract class Document extends \Dom\Node implements \Dom\ParentNode
77
{
88
/** @readonly */
99
public Implementation $implementation;
10+
/** @virtual */
1011
public string $URL;
12+
/** @virtual */
1113
public string $documentURI;
14+
/** @virtual */
1215
public string $characterSet;
16+
/** @virtual */
1317
public string $charset;
18+
/** @virtual */
1419
public string $inputEncoding;
15-
/** @readonly */
20+
/**
21+
* @readonly
22+
* @virtual
23+
*/
1624
public ?DocumentType $doctype;
17-
/** @readonly */
25+
/**
26+
* @readonly
27+
* @virtual
28+
*/
1829
public ?Element $documentElement;
1930
/** @implementation-alias Dom\Element::getElementsByTagName */
2031
public function getElementsByTagName(string $qualifiedName): HTMLCollection
@@ -63,11 +74,20 @@ public function createAttribute(string $localName): Attr
6374
public function createAttributeNS(?string $namespace, string $qualifiedName): Attr
6475
{
6576
}
66-
/** @readonly */
77+
/**
78+
* @readonly
79+
* @virtual
80+
*/
6781
public ?Element $firstElementChild;
68-
/** @readonly */
82+
/**
83+
* @readonly
84+
* @virtual
85+
*/
6986
public ?Element $lastElementChild;
70-
/** @readonly */
87+
/**
88+
* @readonly
89+
* @virtual
90+
*/
7191
public int $childElementCount;
7292
/** @implementation-alias DOMDocument::getElementById */
7393
public function getElementById(string $elementId): ?Element
@@ -117,8 +137,13 @@ public function querySelector(string $selectors): ?Element
117137
public function querySelectorAll(string $selectors): NodeList
118138
{
119139
}
140+
/** @virtual */
120141
public ?HTMLElement $body;
121-
/** @readonly */
142+
/**
143+
* @readonly
144+
* @virtual
145+
*/
122146
public ?HTMLElement $head;
147+
/** @virtual */
123148
public string $title;
124149
}

stubs/ext/dom/Dom/DocumentFragment.php

+12-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@
55
#[\Since('8.4')]
66
class DocumentFragment extends \Dom\Node implements \Dom\ParentNode
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public ?Element $firstElementChild;
10-
/** @readonly */
13+
/**
14+
* @readonly
15+
* @virtual
16+
*/
1117
public ?Element $lastElementChild;
12-
/** @readonly */
18+
/**
19+
* @readonly
20+
* @virtual
21+
*/
1322
public int $childElementCount;
1423
/** @implementation-alias DOMDocumentFragment::appendXML */
1524
public function appendXml(string $data): bool

stubs/ext/dom/Dom/DocumentType.php

+24-6
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,35 @@
55
#[\Since('8.4')]
66
class DocumentType extends \Dom\Node implements \Dom\ChildNode
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public string $name;
10-
/** @readonly */
13+
/**
14+
* @readonly
15+
* @virtual
16+
*/
1117
public DtdNamedNodeMap $entities;
12-
/** @readonly */
18+
/**
19+
* @readonly
20+
* @virtual
21+
*/
1322
public DtdNamedNodeMap $notations;
14-
/** @readonly */
23+
/**
24+
* @readonly
25+
* @virtual
26+
*/
1527
public string $publicId;
16-
/** @readonly */
28+
/**
29+
* @readonly
30+
* @virtual
31+
*/
1732
public string $systemId;
18-
/** @readonly */
33+
/**
34+
* @readonly
35+
* @virtual
36+
*/
1937
public ?string $internalSubset;
2038
/** @implementation-alias DOMElement::remove */
2139
public function remove(): void

stubs/ext/dom/Dom/DtdNamedNodeMap.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
#[\Since('8.4')]
66
class DtdNamedNodeMap implements \IteratorAggregate, \Countable
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public int $length;
1013
/** @implementation-alias DOMNamedNodeMap::item */
1114
public function item(int $index): Entity|Notation|null

stubs/ext/dom/Dom/Element.php

+44-10
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,40 @@
55
#[\Since('8.4')]
66
class Element extends \Dom\Node implements \Dom\ParentNode, \Dom\ChildNode
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public ?string $namespaceURI;
10-
/** @readonly */
13+
/**
14+
* @readonly
15+
* @virtual
16+
*/
1117
public ?string $prefix;
12-
/** @readonly */
18+
/**
19+
* @readonly
20+
* @virtual
21+
*/
1322
public string $localName;
14-
/** @readonly */
23+
/**
24+
* @readonly
25+
* @virtual
26+
*/
1527
public string $tagName;
28+
/** @virtual */
1629
public string $id;
30+
/** @virtual */
1731
public string $className;
1832
/** @readonly */
1933
public TokenList $classList;
2034
/** @implementation-alias DOMNode::hasAttributes */
2135
public function hasAttributes(): bool
2236
{
2337
}
24-
/** @readonly */
38+
/**
39+
* @readonly
40+
* @virtual
41+
*/
2542
public NamedNodeMap $attributes;
2643
/** @implementation-alias DOMElement::getAttributeNames */
2744
public function getAttributeNames(): array
@@ -92,15 +109,30 @@ public function insertAdjacentElement(AdjacentPosition $where, Element $element)
92109
public function insertAdjacentText(AdjacentPosition $where, string $data): void
93110
{
94111
}
95-
/** @readonly */
112+
/**
113+
* @readonly
114+
* @virtual
115+
*/
96116
public ?Element $firstElementChild;
97-
/** @readonly */
117+
/**
118+
* @readonly
119+
* @virtual
120+
*/
98121
public ?Element $lastElementChild;
99-
/** @readonly */
122+
/**
123+
* @readonly
124+
* @virtual
125+
*/
100126
public int $childElementCount;
101-
/** @readonly */
127+
/**
128+
* @readonly
129+
* @virtual
130+
*/
102131
public ?Element $previousElementSibling;
103-
/** @readonly */
132+
/**
133+
* @readonly
134+
* @virtual
135+
*/
104136
public ?Element $nextElementSibling;
105137
/** @implementation-alias DOMElement::setIdAttribute */
106138
public function setIdAttribute(string $qualifiedName, bool $isId): void
@@ -153,7 +185,9 @@ public function closest(string $selectors): ?Element
153185
public function matches(string $selectors): bool
154186
{
155187
}
188+
/** @virtual */
156189
public string $innerHTML;
190+
/** @virtual */
157191
public string $substitutedNodeValue;
158192
/** @return list<NamespaceInfo> */
159193
public function getInScopeNamespaces(): array

stubs/ext/dom/Dom/Entity.php

+12-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
#[\Since('8.4')]
66
class Entity extends \Dom\Node
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public ?string $publicId;
10-
/** @readonly */
13+
/**
14+
* @readonly
15+
* @virtual
16+
*/
1117
public ?string $systemId;
12-
/** @readonly */
18+
/**
19+
* @readonly
20+
* @virtual
21+
*/
1322
public ?string $notationName;
1423
}

stubs/ext/dom/Dom/HTMLCollection.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
#[\Since('8.4')]
66
class HTMLCollection implements \IteratorAggregate, \Countable
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public int $length;
1013
/** @implementation-alias DOMNodeList::item */
1114
public function item(int $index): ?Element

stubs/ext/dom/Dom/NamedNodeMap.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
#[\Since('8.4')]
66
class NamedNodeMap implements \IteratorAggregate, \Countable
77
{
8-
/** @readonly */
8+
/**
9+
* @readonly
10+
* @virtual
11+
*/
912
public int $length;
1013
/** @implementation-alias DOMNamedNodeMap::item */
1114
public function item(int $index): ?Attr

0 commit comments

Comments
 (0)