1 | <?php |
||
19 | class ValidationResultProcessor implements ValidationResultProcessorInterface |
||
20 | { |
||
21 | /** @var array|null all errors bag */ |
||
22 | public $fieldsErrorBag = null; |
||
23 | |||
24 | /** |
||
25 | * @param array $userMessages |
||
26 | */ |
||
27 | public function __construct( |
||
34 | |||
35 | /** |
||
36 | * Returns messages count. |
||
37 | * |
||
38 | * @return int |
||
39 | */ |
||
40 | public function count() |
||
44 | |||
45 | /** |
||
46 | * If such $field contains in. |
||
47 | * |
||
48 | * @param $fieldName |
||
49 | * |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function hasErrors($fieldName) |
||
56 | |||
57 | /** |
||
58 | * Get flat messages array, or all messages from field. |
||
59 | * |
||
60 | * @param string $field |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | public function getErrors($field = '') |
||
80 | |||
81 | /** |
||
82 | * Get 2d array with fields and messages. |
||
83 | * |
||
84 | * @return array |
||
85 | */ |
||
86 | public function getRawErrors() |
||
90 | |||
91 | /** |
||
92 | * For each rule get it's first message. |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | public function firsts() |
||
108 | |||
109 | /** |
||
110 | * Returns first message from $field or error messages array. |
||
111 | * |
||
112 | * @param string $field |
||
113 | * |
||
114 | * @return mixed |
||
115 | */ |
||
116 | public function first($field = '') |
||
127 | |||
128 | /** |
||
129 | * Choosing error message: custom or default. |
||
130 | * |
||
131 | * @param $instance |
||
132 | * |
||
133 | * @return $this |
||
134 | */ |
||
135 | public function chooseErrorMessage(BaseRule $instance) |
||
160 | |||
161 | /** |
||
162 | * Get messages. |
||
163 | * |
||
164 | * @param $fieldName |
||
165 | * |
||
166 | * @return FieldsErrorBag |
||
167 | */ |
||
168 | public function __get($fieldName) |
||
172 | } |
||
173 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..