@@ -103,17 +103,17 @@ class DOMNode
103
103
104
104
public string $ textContent ;
105
105
106
- /** @tentative- return-type */
107
- public function appendChild (DOMNode $ node ): DOMNode | false {}
106
+ /** @return DOMNode|false */
107
+ public function appendChild (DOMNode $ node ) {}
108
108
109
109
/** @tentative-return-type */
110
110
public function C14N (bool $ exclusive = false , bool $ withComments = false , ?array $ xpath = null , ?array $ nsPrefixes = null ): string |false {}
111
111
112
112
/** @tentative-return-type */
113
113
public function C14NFile (string $ uri , bool $ exclusive = false , bool $ withComments = false , ?array $ xpath = null , ?array $ nsPrefixes = null ): int |false {}
114
114
115
- /** @tentative- return-type */
116
- public function cloneNode (bool $ deep = false ): DOMNode | false {}
115
+ /** @return DOMNode|false */
116
+ public function cloneNode (bool $ deep = false ) {}
117
117
118
118
/** @tentative-return-type */
119
119
public function getLineNo (): int {}
@@ -127,8 +127,8 @@ public function hasAttributes(): bool {}
127
127
/** @tentative-return-type */
128
128
public function hasChildNodes (): bool {}
129
129
130
- /** @tentative- return-type */
131
- public function insertBefore (DOMNode $ node , ?DOMNode $ child = null ): DOMNode | false {}
130
+ /** @return DOMNode|false */
131
+ public function insertBefore (DOMNode $ node , ?DOMNode $ child = null ) {}
132
132
133
133
/** @tentative-return-type */
134
134
public function isDefaultNamespace (string $ namespace ): bool {}
@@ -148,11 +148,11 @@ public function lookupPrefix(string $namespace): ?string {}
148
148
/** @tentative-return-type */
149
149
public function normalize (): void {}
150
150
151
- /** @tentative- return-type */
152
- public function removeChild (DOMNode $ child ): DOMNode | false {}
151
+ /** @return DOMNode|false */
152
+ public function removeChild (DOMNode $ child ) {}
153
153
154
- /** @tentative- return-type */
155
- public function replaceChild (DOMNode $ node , DOMNode $ child ): DOMNode | false {}
154
+ /** @return DOMNode|false */
155
+ public function replaceChild (DOMNode $ node , DOMNode $ child ) {}
156
156
}
157
157
158
158
class DOMNameSpaceNode
@@ -190,11 +190,11 @@ public function getFeature(string $feature, string $version): never {}
190
190
/** @tentative-return-type */
191
191
public function hasFeature (string $ feature , string $ version ): bool {}
192
192
193
- /** @tentative- return-type */
194
- public function createDocumentType (string $ qualifiedName , string $ publicId = "" , string $ systemId = "" ): DOMDocumentType | false {}
193
+ /** @return DOMDocumentType|false */
194
+ public function createDocumentType (string $ qualifiedName , string $ publicId = "" , string $ systemId = "" ) {}
195
195
196
- /** @tentative- return-type */
197
- public function createDocument (?string $ namespace = null , string $ qualifiedName = "" , ?DOMDocumentType $ doctype = null ): DOMDocument | false {}
196
+ /** @return DOMDocument|false */
197
+ public function createDocument (?string $ namespace = null , string $ qualifiedName = "" , ?DOMDocumentType $ doctype = null ) {}
198
198
}
199
199
200
200
class DOMDocumentFragment extends DOMNode implements DOMParentNode
@@ -251,8 +251,8 @@ class DOMCharacterData extends DOMNode implements DOMChildNode
251
251
/** @tentative-return-type */
252
252
public function appendData (string $ data ): bool {}
253
253
254
- /** @tentative- return-type */
255
- public function substringData (int $ offset , int $ count ): string | false {}
254
+ /** @return string|false */
255
+ public function substringData (int $ offset , int $ count ) {}
256
256
257
257
/** @tentative-return-type */
258
258
public function insertData (int $ offset , string $ data ): bool {}
@@ -329,11 +329,11 @@ public function getAttribute(string $qualifiedName): string {}
329
329
/** @tentative-return-type */
330
330
public function getAttributeNS (?string $ namespace , string $ localName ): string {}
331
331
332
- /** @tentative- return-type */
333
- public function getAttributeNode (string $ qualifiedName ): DOMAttr | DOMNameSpaceNode | false {}
332
+ /** @return DOMAttr|DOMNameSpaceNode|false */
333
+ public function getAttributeNode (string $ qualifiedName ) {}
334
334
335
- /** @tentative- return-type */
336
- public function getAttributeNodeNS (?string $ namespace , string $ localName ): DOMAttr | DOMNameSpaceNode | null {}
335
+ /** @return DOMAttr|DOMNameSpaceNode|null */
336
+ public function getAttributeNodeNS (?string $ namespace , string $ localName ) {}
337
337
338
338
/** @tentative-return-type */
339
339
public function getElementsByTagName (string $ qualifiedName ): DOMNodeList {}
@@ -353,20 +353,20 @@ public function removeAttribute(string $qualifiedName): bool {}
353
353
/** @tentative-return-type */
354
354
public function removeAttributeNS (?string $ namespace , string $ localName ): void {}
355
355
356
- /** @tentative- return-type */
357
- public function removeAttributeNode (DOMAttr $ attr ): DOMAttr | false {}
356
+ /** @return DOMAttr|false */
357
+ public function removeAttributeNode (DOMAttr $ attr ) {}
358
358
359
- /** @tentative- return-type */
360
- public function setAttribute (string $ qualifiedName , string $ value ): DOMAttr | bool {}
359
+ /** @return DOMAttr|bool */
360
+ public function setAttribute (string $ qualifiedName , string $ value ) {} // TODO return type shouldn't depend on the call scope
361
361
362
362
/** @tentative-return-type */
363
363
public function setAttributeNS (?string $ namespace , string $ qualifiedName , string $ value ): void {}
364
364
365
- /** @tentative- return-type */
366
- public function setAttributeNode (DOMAttr $ attr ): DOMAttr | null | false {}
365
+ /** @return DOMAttr|null|false */
366
+ public function setAttributeNode (DOMAttr $ attr ) {}
367
367
368
- /** @tentative- return-type */
369
- public function setAttributeNodeNS (DOMAttr $ attr ): DOMAttr | null | false {}
368
+ /** @return DOMAttr|null|false */
369
+ public function setAttributeNodeNS (DOMAttr $ attr ) {}
370
370
371
371
/** @tentative-return-type */
372
372
public function setIdAttribute (string $ qualifiedName , bool $ isId ): void {}
@@ -458,53 +458,53 @@ class DOMDocument extends DOMNode implements DOMParentNode
458
458
459
459
public function __construct (string $ version = "1.0 " , string $ encoding = "" ) {}
460
460
461
- /** @tentative- return-type */
462
- public function createAttribute (string $ localName ): DOMAttr | false {}
461
+ /** @return DOMAttr|false */
462
+ public function createAttribute (string $ localName ) {}
463
463
464
- /** @tentative- return-type */
465
- public function createAttributeNS (?string $ namespace , string $ qualifiedName ): DOMAttr | false {}
464
+ /** @return DOMAttr|false */
465
+ public function createAttributeNS (?string $ namespace , string $ qualifiedName ) {}
466
466
467
- /** @tentative- return-type */
468
- public function createCDATASection (string $ data ): DOMCdataSection | false {}
467
+ /** @return DOMCdataSection|false */
468
+ public function createCDATASection (string $ data ) {}
469
469
470
470
/** @tentative-return-type */
471
471
public function createComment (string $ data ): DOMComment {}
472
472
473
473
/** @tentative-return-type */
474
474
public function createDocumentFragment (): DOMDocumentFragment {}
475
475
476
- /** @tentative- return-type */
477
- public function createElement (string $ localName , string $ value = "" ): DOMElement | false {}
476
+ /** @return DOMElement|false */
477
+ public function createElement (string $ localName , string $ value = "" ) {}
478
478
479
- /** @tentative- return-type */
480
- public function createElementNS (?string $ namespace , string $ qualifiedName , string $ value = "" ): DOMElement | false {}
479
+ /** @return DOMElement|false */
480
+ public function createElementNS (?string $ namespace , string $ qualifiedName , string $ value = "" ) {}
481
481
482
- /** @tentative- return-type */
483
- public function createEntityReference (string $ name ): DOMEntityReference | false {}
482
+ /** @return DOMEntityReference|false */
483
+ public function createEntityReference (string $ name ) {}
484
484
485
- /** @tentative- return-type */
486
- public function createProcessingInstruction (string $ target , string $ data = "" ): DOMProcessingInstruction | false {}
485
+ /** @return DOMProcessingInstruction|false */
486
+ public function createProcessingInstruction (string $ target , string $ data = "" ) {}
487
487
488
488
/** @tentative-return-type */
489
489
public function createTextNode (string $ data ): DOMText {}
490
490
491
491
/** @tentative-return-type */
492
- public function getElementById (string $ elementId ): DOMElement | null {}
492
+ public function getElementById (string $ elementId ): ? DOMElement {}
493
493
494
494
/** @tentative-return-type */
495
495
public function getElementsByTagName (string $ qualifiedName ): DOMNodeList {}
496
496
497
497
/** @tentative-return-type */
498
498
public function getElementsByTagNameNS (?string $ namespace , string $ localName ): DOMNodeList {}
499
499
500
- /** @tentative- return-type */
501
- public function importNode (DOMNode $ node , bool $ deep = false ): DOMNode | false {}
500
+ /** @return DOMNode|false */
501
+ public function importNode (DOMNode $ node , bool $ deep = false ) {}
502
502
503
- /** @tentative- return-type */
504
- public function load (string $ filename , int $ options = 0 ): DOMDocument | bool {}
503
+ /** @return DOMDocument|bool */
504
+ public function load (string $ filename , int $ options = 0 ) {} // TODO return type shouldn't depend on the call scope
505
505
506
- /** @tentative- return-type */
507
- public function loadXML (string $ source , int $ options = 0 ): DOMDocument | bool {}
506
+ /** @return DOMDocument|bool */
507
+ public function loadXML (string $ source , int $ options = 0 ) {} // TODO return type shouldn't depend on the call scope
508
508
509
509
/** @tentative-return-type */
510
510
public function normalizeDocument (): void {}
@@ -516,11 +516,11 @@ public function registerNodeClass(string $baseClass, ?string $extendedClass): bo
516
516
public function save (string $ filename , int $ options = 0 ): int |false {}
517
517
518
518
#ifdef LIBXML_HTML_ENABLED
519
- /** @tentative- return-type */
520
- public function loadHTML (string $ source , int $ options = 0 ): DOMDocument | bool {}
519
+ /** @return DOMDocument|bool */
520
+ public function loadHTML (string $ source , int $ options = 0 ) {} // TODO return type shouldn't depend on the call scope
521
521
522
- /** @tentative- return-type */
523
- public function loadHTMLFile (string $ filename , int $ options = 0 ): DOMDocument | bool {}
522
+ /** @return DOMDocument|bool */
523
+ public function loadHTMLFile (string $ filename , int $ options = 0 ) {} // TODO return type shouldn't depend on the call scope
524
524
525
525
/** @tentative-return-type */
526
526
public function saveHTML (?DOMNode $ node = null ): string |false {}
@@ -552,8 +552,8 @@ public function validate(): bool {}
552
552
/** @tentative-return-type */
553
553
public function xinclude (int $ options = 0 ): int |false {}
554
554
555
- /** @tentative- return-type */
556
- public function adoptNode (DOMNode $ node ): DOMNode | false {}
555
+ /** @return DOMNode|false */
556
+ public function adoptNode (DOMNode $ node ) {}
557
557
558
558
/** @param DOMNode|string $nodes */
559
559
public function append (...$ nodes ): void {}
@@ -584,8 +584,8 @@ public function isWhitespaceInElementContent(): bool {}
584
584
*/
585
585
public function isElementContentWhitespace (): bool {}
586
586
587
- /** @tentative- return-type */
588
- public function splitText (int $ offset ): DOMText | false {}
587
+ /** @return DOMText|false */
588
+ public function splitText (int $ offset ) {}
589
589
}
590
590
591
591
class DOMNamedNodeMap implements IteratorAggregate, Countable
@@ -594,13 +594,13 @@ class DOMNamedNodeMap implements IteratorAggregate, Countable
594
594
public int $ length ;
595
595
596
596
/** @tentative-return-type */
597
- public function getNamedItem (string $ qualifiedName ): ?DOMNode {}
597
+ public function getNamedItem (string $ qualifiedName ): ?DOMNode {} // TODO DOM spec returns DOMAttr
598
598
599
599
/** @tentative-return-type */
600
- public function getNamedItemNS (?string $ namespace , string $ localName ): ?DOMNode {}
600
+ public function getNamedItemNS (?string $ namespace , string $ localName ): ?DOMNode {} // TODO DOM spec returns DOMAttr
601
601
602
602
/** @tentative-return-type */
603
- public function item (int $ index ): ?DOMNode {}
603
+ public function item (int $ index ): ?DOMNode {} // TODO DOM spec returns DOMAttr
604
604
605
605
/** @tentative-return-type */
606
606
public function count (): int {}
0 commit comments