1 | <?php |
||
15 | class CrudValidator |
||
16 | { |
||
17 | /** |
||
18 | * @var CrudEntry |
||
19 | */ |
||
20 | protected $entry; |
||
21 | |||
22 | /** |
||
23 | * @var Validator |
||
24 | */ |
||
25 | protected $validator; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $form_data; |
||
31 | |||
32 | /** |
||
33 | * CrudValidator constructor. |
||
34 | * |
||
35 | * @param void |
||
36 | */ |
||
37 | public function __construct(CrudEntry $entry) |
||
41 | |||
42 | /** |
||
43 | * Defines the CrudEntry to validate. |
||
44 | * |
||
45 | * @param CrudEntry $entry |
||
46 | * @return self |
||
47 | */ |
||
48 | public function setEntry(CrudEntry $entry) |
||
54 | |||
55 | /** |
||
56 | * Gets the entry. |
||
57 | * |
||
58 | * @param void |
||
59 | * @return CrudEntry |
||
60 | */ |
||
61 | public function getEntry() |
||
65 | |||
66 | /** |
||
67 | * @param array $data |
||
68 | * @return self |
||
69 | */ |
||
70 | public function setFormData(array $data) |
||
76 | |||
77 | /** |
||
78 | * @param Request $request |
||
79 | * @return self |
||
80 | */ |
||
81 | public function validateRequest(Request $request) |
||
85 | |||
86 | /** |
||
87 | * Validate given array of data against fields rules. |
||
88 | * |
||
89 | * @param array $fields_data |
||
90 | * @return self |
||
91 | */ |
||
92 | public function validate(array $fields_data) |
||
103 | |||
104 | /** |
||
105 | * @param void |
||
106 | * @return bool |
||
107 | */ |
||
108 | public function fails() |
||
112 | |||
113 | /** |
||
114 | * @param void |
||
115 | * @return bool |
||
116 | */ |
||
117 | public function passes() |
||
121 | |||
122 | /** |
||
123 | * @param void |
||
124 | * @return RedirectResponse |
||
125 | */ |
||
126 | public function redirect() |
||
135 | |||
136 | /** |
||
137 | * @param void |
||
138 | * @return bool |
||
139 | * @throws FailedValidationException |
||
140 | */ |
||
141 | public function save() |
||
152 | |||
153 | /** |
||
154 | * @param void |
||
155 | * @return self |
||
156 | */ |
||
157 | protected function resetValidator() |
||
165 | |||
166 | /** |
||
167 | * @param void |
||
168 | * @return Validator |
||
169 | */ |
||
170 | public function getValidator() |
||
174 | } |
||
175 |
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..