Closed tkanzaki42 closed 3 weeks ago
Describe the bug An incorrect warning appears Expected type 'null|string'. Found 'void'.intelephense(P1006)
Expected type 'null|string'. Found 'void'.intelephense(P1006)
To Reproduce Please try writing this code
public function signup($credentials): ?string { try { $user = $this->userRepository->create($credentials); $token = auth()->login($user); return $token; } catch (\Exception $e) { throw new UnauthorizedHttpException('Unauthorized', 'User creation failed.'); } }
Expected behavior There should be no warning
Screenshots
Platform and version
What is the return type of login() when you hover over it?
login()
Describe the bug An incorrect warning appears
Expected type 'null|string'. Found 'void'.intelephense(P1006)
To Reproduce Please try writing this code
Expected behavior There should be no warning
Screenshots![image](https://github.com/bmewburn/vscode-intelephense/assets/88282411/f96d815f-bf16-449e-88e0-c4270f8c9b29)
Platform and version