Skip to content

Commit

Permalink
Fix "Strict comparison using !== between ReflectionClass and null wil…
Browse files Browse the repository at this point in the history
…l always evaluate to true."
  • Loading branch information
staabm committed Nov 16, 2024
1 parent 5ad50c7 commit f8bc062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Framework/MockObject/Generator/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit f8bc062

Please sign in to comment.