[php-src] PR #11342: DOMNodeList::item may return DOMElement.

From: Date: Mon, 29 May 2023 15:06:23 +0000
Subject: [php-src] PR #11342: DOMNodeList::item may return DOMElement.
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-22617@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/11342 Author: divinity76 Not explicitly documenting the possibility of returning DOMElement causes the Intelephense linter (a popular PHP linter with ~9 million downloads: https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client ) to think this code is bad: $xp->query("whatever")->item(0)->getAttribute("foo"); because DOMNode does not have getAttribute (while DOMElement does). documenting the DOMElement return type should fix Intelephense's linter.

« previous php.git-pulls (#22617) next »