| 1 | <?php |
||
| 21 | class ValidationFailedException extends \Exception |
||
| 22 | { |
||
| 23 | private $errors; |
||
| 24 | |||
| 25 | 8 | public static function fromErrors(array $errors = array(), $code = 0, \Exception $previous = null) |
|
| 32 | |||
| 33 | 8 | public function __construct($message = '', array $errors = array(), $code = 0, \Exception $previous = null) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return array |
||
| 42 | */ |
||
| 43 | 4 | public function getErrors() |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @return array |
||
|
|
|||
| 50 | */ |
||
| 51 | 4 | public function getErrorsAsString() |
|
| 55 | } |
||
| 56 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.