1 | <?php |
||
27 | class Form |
||
28 | { |
||
29 | /** |
||
30 | * @var FormFactory |
||
31 | */ |
||
32 | private $formFactory; |
||
33 | |||
34 | /** |
||
35 | * @var DocumentType |
||
36 | */ |
||
37 | private $formType; |
||
38 | |||
39 | /** |
||
40 | * @var ValidatorInterface |
||
41 | */ |
||
42 | private $validator; |
||
43 | |||
44 | /** |
||
45 | * @param FormFactory $formFactory Factory, providing different file document instances. |
||
46 | * @param DocumentType $formType Type of form to be set |
||
47 | * @param ValidatorInterface $validator Validator to verify correctness of the provided data |
||
48 | */ |
||
49 | 189 | public function __construct( |
|
58 | |||
59 | /** |
||
60 | * @param Request $request request |
||
61 | * @param DocumentModel $model model |
||
62 | * |
||
63 | * @return \Symfony\Component\Form\Form |
||
64 | */ |
||
65 | 67 | public function getForm(Request $request, DocumentModel $model) |
|
70 | |||
71 | /** |
||
72 | * Validates the provided information against a form. |
||
73 | * |
||
74 | * @param FormInterface $form form to check |
||
75 | * @param DocumentModel $model Model to determine entity to be used |
||
76 | * @param FormDataMapperInterface $formDataMapper Mapps the entity to form fields |
||
77 | * @param string $jsonContent json data |
||
78 | * |
||
79 | * @throws ValidationException |
||
80 | * @return mixed |
||
81 | */ |
||
82 | 67 | public function checkForm( |
|
102 | |||
103 | /** |
||
104 | * validate raw json input |
||
105 | * |
||
106 | * @param Request $request request |
||
107 | * @param Response $response response |
||
108 | * @param string $content Alternative request content. |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | 74 | public function checkJsonRequest(Request $request, Response $response, $content = '') |
|
149 | |||
150 | /** |
||
151 | * Validate JSON patch for any object |
||
152 | * |
||
153 | * @param array $jsonPatch json patch as array |
||
154 | * |
||
155 | * @throws InvalidJsonPatchException |
||
156 | * @return void |
||
157 | */ |
||
158 | 14 | public function checkJsonPatchRequest(array $jsonPatch) |
|
169 | /** |
||
170 | * Used for backwards compatibility to PHP 5.4 |
||
171 | * |
||
172 | * @return string |
||
173 | */ |
||
174 | 1 | private function getLastJsonErrorMessage() |
|
184 | } |
||
185 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: