Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php namespace Pz\Doctrine\Rest\Action; |
||
18 | protected function hydrate($entity, EntityManager $em, RestRequestAbstract $request) |
||
19 | { |
||
20 | $hydrator = $request->getContentType() === RestRequestAbstract::JSON_API_CONTENT_TYPE ? |
||
21 | new JsonApiHydrator($em) : new ArrayHydrator($em); |
||
22 | |||
23 | return $hydrator->hydrate($entity, $request->request->all()); |
||
24 | } |
||
26 |