1 | <?php |
||
14 | class ValidationException extends \RuntimeException |
||
15 | { |
||
16 | protected $messages = []; |
||
17 | |||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | public function __construct(array $messages, $code = 400, \Exception $previous = null) |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @param ConstraintViolationListInterface $vilations |
||
|
|||
30 | * @return ValidationException |
||
31 | */ |
||
32 | public static function createFromConstraintViolationList(ConstraintViolationListInterface $list): self |
||
44 | |||
45 | |||
46 | /** |
||
47 | * @return array |
||
48 | */ |
||
49 | public function getMessages() |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Переведенные сообщения об ошибках |
||
57 | * |
||
58 | * @param TranslatorInterface $translator |
||
59 | * @return array |
||
60 | * |
||
61 | * @throws \Exception |
||
62 | */ |
||
63 | public function getTranslatedMessages(TranslatorInterface $translator) |
||
72 | } |
||
73 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.