-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined XMLReader properties with local phpstorm-stubs patch
- Loading branch information
1 parent
59ae706
commit 2d364d7
Showing
6 changed files
with
166 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- dom/dom_c.php 2024-01-02 12:04:54 | ||
+++ dom/dom_c.php 2024-01-21 10:41:56 | ||
@@ -1347,6 +1347,14 @@ | ||
*/ | ||
class DOMNamedNodeMap implements IteratorAggregate, Countable | ||
{ | ||
+ | ||
+ /** | ||
+ * The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive. | ||
+ * @var int | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $length; | ||
/** | ||
* Retrieves a node specified by name | ||
* @link https://php.net/manual/en/domnamednodemap.getnameditem.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
--- xmlreader/xmlreader.php 2024-01-21 10:44:31 | ||
+++ xmlreader/xmlreader.php 2024-01-21 10:48:24 | ||
@@ -28,7 +28,119 @@ | ||
*/ | ||
class XMLReader | ||
{ | ||
+ /** | ||
+ * The number of attributes on the node | ||
+ * @var int | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $attributeCount; | ||
+ | ||
+ /** | ||
+ * The base URI of the node | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $baseURI; | ||
+ | ||
+ /** | ||
+ * Depth of the node in the tree, starting at 0 | ||
+ * @var int | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $depth; | ||
+ | ||
+ /** | ||
+ * Indicates if node has attributes | ||
+ * @var bool | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $hasAttributes; | ||
+ | ||
+ /** | ||
+ * Indicates if node has a text value | ||
+ * @var bool | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $hasValue; | ||
+ | ||
+ /** | ||
+ * Indicates if attribute is defaulted from DTD | ||
+ * @var bool | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $isDefault; | ||
+ | ||
+ /** | ||
+ * Indicates if node is an empty element tag | ||
+ * @var bool | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $isEmptyElement; | ||
+ | ||
+ /** | ||
+ * The local name of the node | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $localName; | ||
+ | ||
/** | ||
+ * The qualified name of the node | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $name; | ||
+ | ||
+ /** | ||
+ * The URI of the namespace associated with the node | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $namespaceURI; | ||
+ | ||
+ /** | ||
+ * The node type for the node | ||
+ * @var int | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $nodeType; | ||
+ | ||
+ /** | ||
+ * The prefix of the namespace associated with the node | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $prefix; | ||
+ | ||
+ /** | ||
+ * The text value of the node | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $value; | ||
+ | ||
+ /** | ||
+ * The xml:lang scope which the node resides | ||
+ * @var string | ||
+ * @readonly | ||
+ */ | ||
+ #[PhpStormStubsElementAvailable(from: '8.1')] | ||
+ public $xmlLang; | ||
+ | ||
+ /** | ||
* No node type | ||
*/ | ||
public const NONE = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Bug8629; | ||
|
||
use XMLReader; | ||
|
||
function (): void { | ||
$reader = new XMLReader(); | ||
var_dump($reader->nodeType); | ||
}; |