diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 74a496ad2..9a977efcd 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -31,6 +31,3 @@ parameters: message: '#^Array has 2 duplicate keys with value .ClassWithConstants\.SOME_KEY. \(\\Doctrine\\Tests\\Annotations\\Fixtures\\ClassWithConstants::SOME_KEY, \\Doctrine\\Tests\\Annotations\\Fixtures\\ClassWithConstants::SOME_KEY\)\.$#' path: '%currentWorkingDirectory%/tests\Doctrine\Tests\Annotations\DocParserTest.php' # bug in doctrine/lexer - - - message: '#^Call to static method PHPUnit\\Framework\\Assert::assertNull\(\) with array will always evaluate to false\.$#' - path: '%currentWorkingDirectory%/tests\Doctrine\Tests\Annotations\DocLexerTest.php' diff --git a/tests/Doctrine/Tests/Annotations/AbstractReaderTest.php b/tests/Doctrine/Tests/Annotations/AbstractReaderTest.php index fa75b619a..69aaf3088 100644 --- a/tests/Doctrine/Tests/Annotations/AbstractReaderTest.php +++ b/tests/Doctrine/Tests/Annotations/AbstractReaderTest.php @@ -478,12 +478,10 @@ public function testGloballyIgnoredAnnotationNotIgnored() : void $reader = $this->getReader(); $class = new \ReflectionClass(Fixtures\ClassDDC1660::class); - $testLoader = static function (string $className) : bool { + $testLoader = static function (string $className) : void { if ($className === 'since') { throw new \InvalidArgumentException('Globally ignored annotation names should never be passed to an autoloader.'); } - - return false; }; spl_autoload_register($testLoader, true, true); diff --git a/tests/Doctrine/Tests/Annotations/AnnotationReaderTest.php b/tests/Doctrine/Tests/Annotations/AnnotationReaderTest.php index f8c71e199..20b0786b3 100644 --- a/tests/Doctrine/Tests/Annotations/AnnotationReaderTest.php +++ b/tests/Doctrine/Tests/Annotations/AnnotationReaderTest.php @@ -144,11 +144,10 @@ public function testGloballyIgnoredAnnotationNotIgnored() : void { $reader = $this->getReader(); $class = new \ReflectionClass(Fixtures\ClassDDC1660::class); - $testLoader = static function (string $className) : bool { + $testLoader = static function (string $className) : void { if ($className === 'since') { throw new \InvalidArgumentException('Globally ignored annotation names should never be passed to an autoloader.'); } - return false; }; spl_autoload_register($testLoader, true, true); try {