Skip to content

WIP - Fix 13076 #4029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions stubs/dom.stub
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
{

/**
* @var DOMNamedNodeMap|null
* @var DOMNamedNodeMap<DOMAttr>|null
*/
public $attributes;

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-2 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-3 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/ignore-error-extension composer install ../../bin/phpstan )

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-meta-extension composer install ../../bin/phpstan -vv...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-7 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug10449 ../../bin/phpstan analyze git apply patch.diff rm phpstan...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug10449b ../../bin/phpstan analyze git apply patch.diff rm phpsta...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-12606 export CONFIGTEST=test ../../bin/phpstan )

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-5 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-1 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-11857 composer install ../../bin/phpstan )

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-traits ../../bin/phpstan analyse patch -b src/FooTrai...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse e2e/only-files-not-analysed-trait/src -c e2e/only-files-not-analys...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622 echo -n > phpstan-baseline.neon ../../bin/phpstan -vvv pa...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-4 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/baseline-uninit-prop-trait ../../bin/phpstan analyse --debug --configuration te...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-8 composer install ../../bin/phpstan echo -en '\n' >>...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622-trait echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-scanned ../../bin/phpstan patch -b src/Generated/Foo....

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-6 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Integration tests (ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/discussion-11362 composer install ../../bin/phpstan )

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Integration tests (windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 36 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

PHPDoc tag @var for property DOMNode::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

/**
* @phpstan-assert-if-true !null $this->attributes
* @phpstan-assert-if-true =DOMNamedNodeMap $this->attributes
* @return bool
*/
public function hasAttributes() {}
Expand All @@ -46,6 +46,9 @@
class DOMElement extends DOMNode
{

/** @var DOMNamedNodeMap<DOMAttr> */
public $attributes;

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-2 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-3 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/ignore-error-extension composer install ../../bin/phpstan )

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-meta-extension composer install ../../bin/phpstan -vv...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-7 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug10449 ../../bin/phpstan analyze git apply patch.diff rm phpstan...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug10449b ../../bin/phpstan analyze git apply patch.diff rm phpsta...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-12606 export CONFIGTEST=test ../../bin/phpstan )

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-5 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-1 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-11857 composer install ../../bin/phpstan )

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-traits ../../bin/phpstan analyse patch -b src/FooTrai...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse e2e/only-files-not-analysed-trait/src -c e2e/only-files-not-analys...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622 echo -n > phpstan-baseline.neon ../../bin/phpstan -vvv pa...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-4 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/baseline-uninit-prop-trait ../../bin/phpstan analyse --debug --configuration te...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-8 composer install ../../bin/phpstan echo -en '\n' >>...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622-trait echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-scanned ../../bin/phpstan patch -b src/Generated/Foo....

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-6 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Integration tests (ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/discussion-11362 composer install ../../bin/phpstan )

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / Integration tests (windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

Check failure on line 50 in stubs/dom.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

PHPDoc tag @var for property DOMElement::$attributes contains generic type DOMNamedNodeMap<DOMAttr> but class DOMNamedNodeMap is not generic.

/** @var DOMDocument */
public $ownerDocument;

Expand Down
26 changes: 26 additions & 0 deletions tests/PHPStan/Analyser/nsrt/bug-13076.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php declare(strict_types = 1);

namespace Bug13076;

use function PHPStan\Testing\assertType;

class Foo
{
public function test(\DOMNode $node): void
{
if ($node->hasAttributes()) {
assertType('DOMNamedNodeMap&iterable<DOMAttr>', $node->attributes);
} else {
assertType('(DOMNamedNodeMap&iterable<DOMAttr>)|null', $node->attributes);
}
}

public function testElement(\DOMElement $node): void
{
if ($node->hasAttributes()) {
assertType('DOMNamedNodeMap&iterable<DOMAttr>', $node->attributes);
} else {
assertType('DOMNamedNodeMap&iterable<DOMAttr>', $node->attributes);
}
}
}
Loading