In CheckInterface::check() it is also possible to throw an exception
instead of returning an object of type ResultInterface. This exception
is then converted to a Failure in Runner::run(). This should be
reflected in the PHPDoc via a throws tag in my opinion.
This also has the advantage that e.g. PhpStorm does not show a warning
if you intentionally do not catch an exception in your own checker.
Description
In
CheckInterface::check()
it is also possible to throw an exception instead of returning an object of typeResultInterface
. This exception is then converted to aFailure
inRunner::run()
. This should be reflected in the PHPDoc via a throws tag in my opinion.This also has the advantage that e.g. PhpStorm does not show a warning if you intentionally do not catch an exception in your own checker.
Signed-off-by: Yannick Ihmels yannick@ihmels.org