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: Closed Package: DOM XML related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [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
 [2020-10-30 11:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=24219de95d129309f248f1e0874dcddc015bfbff
Log: Fix #79273: Correctly document nullable properties on DOMDocument and DOMNode
 [2020-10-30 11:06 UTC] phpdocbot@php.net
-Status: Assigned +Status: Closed
 [2020-10-30 22:35 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=1a999520e013363e797449c5a69fb2d913587d01
Log: Fix #79273: Correctly document nullable properties on DOMDocument
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 09:01:24 2020 UTC