Issue #3309047 by mondrake: Fix 'should return {type} but return statement is missing' PHPStan L0 errors in test code (cherry picked from commit 830646e6)