| Conditions | 5 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function supports(Request $request, ArgumentMetadata $argument): bool |
||
| 26 | { |
||
| 27 | if ($request->attributes->has(DeserializationContext::REQUEST_ATTRIBUTE) === false) { |
||
| 28 | return false; |
||
| 29 | } |
||
| 30 | |||
| 31 | $routeContext = $request->attributes->get(RouteContext::REQUEST_ATTRIBUTE); |
||
| 32 | if (isset($routeContext[RouteContext::DESERIALIZATION_OBJECT]) === false) { |
||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 36 | if ($routeContext[RouteContext::DESERIALIZATION_OBJECT] !== $argument->getType() && $this->hasDeserializedObjectAttribute($argument) === false) { |
||
| 37 | return false; |
||
| 38 | } |
||
| 39 | |||
| 40 | return true; |
||
| 41 | } |
||
| 57 |