php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79273 DOMNode: Class synopsis lacks info about nullable properties
Submitted: 2020-02-13 20:09 UTC Modified: 2020-02-28 22:35 UTC
From: ca at lsp dot net Assigned: beberlei (profile)
Status: Assigned Package: DOM XML related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ca at lsp dot net
New email:
PHP Version: OS:

 

 [2020-02-13 20:09 UTC] ca at lsp dot net
Description:
------------
---
From manual page: https://php.net/class.domnode
---

`DOMNode` has several properties that can be `NULL`:

* nodeValue
* parentNode
* firstChild
* lastChild
* previousSibling
* nextSibling
* attributes
* ownerDocument

The class synopsis, however, doesn't provide this important information.

Expected result:
----------------
public ?string $nodeValue ;
public readonly int $nodeType ;
public readonly ?DOMNode $parentNode ;
public readonly DOMNodeList $childNodes ;
public readonly ?DOMNode $firstChild ;
public readonly ?DOMNode $lastChild ;
public readonly ?DOMNode $previousSibling ;
public readonly ?DOMNode $nextSibling ;
public readonly ?DOMNamedNodeMap $attributes ;
public readonly ?DOMDocument $ownerDocument ;

Actual result:
--------------
public string $nodeValue ;
public readonly int $nodeType ;
public readonly DOMNode $parentNode ;
public readonly DOMNodeList $childNodes ;
public readonly DOMNode $firstChild ;
public readonly DOMNode $lastChild ;
public readonly DOMNode $previousSibling ;
public readonly DOMNode $nextSibling ;
public readonly DOMNamedNodeMap $attributes ;
public readonly DOMDocument $ownerDocument ;

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-28 22:35 UTC] beberlei@php.net
-Assigned To: +Assigned To: beberlei
 [2020-02-28 23:23 UTC] beberlei@php.net
The following pull request has been associated:

Patch Name: #79273: Document nullable properties on DOMDocument and DOMNode
On GitHub:  https://github.com/php/doc-en/pull/52
Patch:      https://github.com/php/doc-en/pull/52.patch
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 29 15:01:25 2020 UTC