Skip to content

Commit

Permalink
Static analysis improvements (#291)
Browse files Browse the repository at this point in the history
* safer use of nullable domNode property

* stan: improve types (level 6)

* stan: run phpstan in level 6 mode
  • Loading branch information
g105b authored Sep 15, 2021
1 parent 14a6001 commit cbe5a00
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ jobs:
uses: php-actions/phpstan@v2
with:
path: src/
level: 6
21 changes: 11 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ParentNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function querySelector(string $selectors):?Element {
* elements using selectors for more information about using selectors
* to identify elements. Multiple selectors may be specified by
* separating them using commas.
* @return NodeList<Element> A non-live NodeList containing one Element
* @return NodeList A non-live NodeList containing one Element
* object for each descendant node that matches at least one of the
* specified selectors.
* @link https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/querySelectorAll
Expand Down
1 change: 0 additions & 1 deletion test/phpunit/DocumentFragmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public function testGetElementByIdEmpty():void {
}

public function testGetElementById():void {
/** @var DocumentFragment $sut */
$sut = NodeTestFactory::createFragment();
$nodeWithId = $sut->ownerDocument->createElement("div");
$nodeWithId->id = "test";
Expand Down

0 comments on commit cbe5a00

Please sign in to comment.