From 2da4cf85e13dedddf298d7d244934010ef822e2d Mon Sep 17 00:00:00 2001 From: Krishnaprasad MG Date: Tue, 1 Oct 2019 10:32:00 +0200 Subject: [PATCH] Fix phpstan failures --- phpstan.neon.dist | 3 --- tests/Doctrine/Tests/Annotations/AbstractReaderTest.php | 4 +--- tests/Doctrine/Tests/Annotations/AnnotationReaderTest.php | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) 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 {