Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | 6 | protected function serialize(Request $request, ArgumentMetadata $argument): object |
|
19 | { |
||
20 | 6 | static $queryMethods = [Request::METHOD_GET, Request::METHOD_HEAD]; |
|
21 | |||
22 | 6 | $data = \in_array($request->getMethod(), $queryMethods, true) ? |
|
23 | 1 | $request->query->all() : |
|
24 | 6 | $request->request->all(); |
|
25 | |||
26 | 6 | return $this->serializer->denormalize($data, $argument->getType(), $this->getSerializeFormat($request)); |
|
27 | } |
||
29 |