I have a doccomment on a class like so:
/**
* @method Response\FooResponse foo(Parameters\FooParameters $parameters)
*/
class Foo
{
}
This method can throw a FooException
. How do I indicate this in the doccomment?
I have a doccomment on a class like so:
/**
* @method Response\FooResponse foo(Parameters\FooParameters $parameters)
*/
class Foo
{
}
This method can throw a FooException
. How do I indicate this in the doccomment?
Just use PHPDoc's @throws in the docblock to specify which kind of exception might occur in that method.
Since JSDocs are similar in definitions, you can use @throws
. Check this article for reference:
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#throwstag