Skip to content

Commit d681069

Browse files
committed
bleh
1 parent 3d93d42 commit d681069

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

stubs/dom.stub

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DOMNode
3131
{
3232
/**
3333
* @readonly
34-
* @var DOMNamedNodeMap<DOMAttr<string>>|null
34+
* @var DOMNamedNodeMap<DOMAttr>|null
3535
*/
3636
public $attributes;
3737

@@ -45,13 +45,6 @@ class DOMElement extends DOMNode
4545
/** @var DOMDocument */
4646
public $ownerDocument;
4747

48-
/**
49-
* @readonly
50-
* @inherited
51-
* @var DOMNamedNodeMap<DOMAttr<string>>|null
52-
*/
53-
public $attributes;
54-
5548
/**
5649
* @param string $name
5750
* @return DOMNodeList<DOMElement>
@@ -66,22 +59,12 @@ class DOMElement extends DOMNode
6659
public function getElementsByTagNameNS ($namespaceURI, $localName) {}
6760

6861
/**
69-
* @template T of string
70-
* @param T $qualifiedName
71-
* @return bool
72-
* @phpstan-assert-if-true (T is 'xml:id' ? DOMNameSpaceNode : DOMAttr<T>) $this->hasAttribute($qualifiedName)
73-
* @phpstan-assert-if-true DOMNameSpaceNode<DOMAttr<T>|DOMAttr<string>> $this->$attributes
62+
* @phpstan-assert-if-true DOMNameSpaceNode|DOMAttr $this->hasAttribute($qualifiedName)
63+
* @phpstan-assert-if-true DOMNamedNodeMap<DOMAttr> $this->attributes
7464
*/
7565
public function hasAttribute(string $qualifiedName): bool
7666

77-
public function hasAttributeNS(?string $namespace, string $localName): bool
78-
79-
/**
80-
* @template T of string
81-
* @param T $qualifiedName
82-
* @return (T is 'xml:id' ? DOMNameSpaceNode|false : DOMAttr|false)
83-
*/
84-
public function getAttributeNode(string $qualifiedName): DOMAttr<T>|DOMNameSpaceNode|false
67+
public function getAttributeNode(string $qualifiedName): DOMAttr|DOMNameSpaceNode|false
8568
}
8669

8770
/**
@@ -113,20 +96,11 @@ class DOMXPath
11396

11497
}
11598

116-
/**
117-
* @template Name as string
118-
*/
11999
class DOMAttr extends DOMNode
120100
{
121101
/** @var DOMDocument */
122102
public $ownerDocument;
123103

124-
/**
125-
* @var Name
126-
* @readonly
127-
*/
128-
public $name;
129-
130104
}
131105

132106
class DOMCharacterData extends DOMNode

0 commit comments

Comments
 (0)