We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\Symfony\Contracts\HttpClient\ResponseInterface::getInfo defines the return type as mixed in phpdoc. However, when the value of the argument is known, we could have more precise info thanks to the type defined for a bunch of known info keys (if the key is unknown in the interface contract, the type will indeed be mixed): https://github.com/symfony/symfony/blob/22a2729f371eb4bc8b08330a872291b9712e93da/src/Symfony/Contracts/HttpClient/ResponseInterface.php#L81-L109
\Symfony\Contracts\HttpClient\ResponseInterface::getInfo
mixed
The text was updated successfully, but these errors were encountered:
Can't it be done directly with a conditional return type ?
/** * @return ($type is null ? array : ($type is 'foo' ? bool : ($type is 'bar' ? string : ...))) */ public function getInfo(string $type = null): mixed;
Sorry, something went wrong.
No branches or pull requests
\Symfony\Contracts\HttpClient\ResponseInterface::getInfo
defines the return type asmixed
in phpdoc. However, when the value of the argument is known, we could have more precise info thanks to the type defined for a bunch of known info keys (if the key is unknown in the interface contract, the type will indeed bemixed
): https://github.com/symfony/symfony/blob/22a2729f371eb4bc8b08330a872291b9712e93da/src/Symfony/Contracts/HttpClient/ResponseInterface.php#L81-L109The text was updated successfully, but these errors were encountered: