how can I describe the exceptions thrown from callable in phpDoc? For example I have:
/**
* @param callable(int): bool
*/
function (callable $foo, int $number): ?bool
{
try {
return $foo($number);
} catch (InvalidNumberException) {
return null;
}
}
And I want something like this:
/**
* @param callable(int): bool throws InvalidNumberException
*/
function (callable $foo, int $number): ?bool
{
try {
return $foo($number);
} catch (InvalidNumberException) {
return null;
}
}