Fix 'undefined variable' PHPStan L0 errors