diff --git a/src/CodeInspector/StatementsChecker.php b/src/CodeInspector/StatementsChecker.php index 0f333e7c8..511c98c99 100644 --- a/src/CodeInspector/StatementsChecker.php +++ b/src/CodeInspector/StatementsChecker.php @@ -2319,7 +2319,7 @@ class StatementsChecker $absolute_classes = explode('|', $return_type); if (self::_isMock($return_type)) { - continue; + return true; } if (!is_a($return_type, $expected_type, true) && !is_a($return_type, $return_type, true)) {