We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9a784a commit 5bbd75bCopy full SHA for 5bbd75b
src/HtmlParser.php
@@ -59,7 +59,7 @@ public function getRootNode( DOMDocument $document ): DOMElement {
59
throw new Exception( 'Template should have only one root node' );
60
}
61
62
- return $rootNodes->item( 0 );
+ return $rootNodes[0];
63
64
65
/**
@@ -81,7 +81,7 @@ public function getHtmlElement( DOMDocument $document ): DOMElement {
81
*/
82
public function getBodyElement( DOMDocument $document ): DOMElement {
83
$htmlElement = $this->getHtmlElement( $document );
84
- $bodyElement = $htmlElement->childNodes->item( 0 );
+ $bodyElement = $htmlElement->childNodes[0];
85
if ( $bodyElement->tagName !== 'body' ) {
86
throw new Exception( "Expected <body>, got <{$bodyElement->tagName}>" );
87
0 commit comments