From f8bc062ea0cae1a579e8920b0d487f0b52a82e70 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 16 Nov 2024 09:49:57 +0100 Subject: [PATCH] Fix "Strict comparison using !== between ReflectionClass and null will always evaluate to true." --- src/Framework/MockObject/Generator/Generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Framework/MockObject/Generator/Generator.php b/src/Framework/MockObject/Generator/Generator.php index 0ac13fb1cc1..9f023be3cfa 100644 --- a/src/Framework/MockObject/Generator/Generator.php +++ b/src/Framework/MockObject/Generator/Generator.php @@ -776,7 +776,7 @@ private function generateCodeForTestDoubleClass(string $type, bool $mockObject, if (is_array($explicitMethods)) { foreach ($explicitMethods as $methodName) { - if ($class !== null && $class->hasMethod($methodName)) { + if ($class->hasMethod($methodName)) { $method = $class->getMethod($methodName); if ($this->canMethodBeDoubled($method)) {