1 | <?php |
||
11 | class SerializerCommandExtractor implements CommandExtractorInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var SerializerInterface |
||
15 | */ |
||
16 | private $serializer; |
||
17 | |||
18 | /** |
||
19 | * @var DecoderInterface |
||
20 | */ |
||
21 | private $decoder; |
||
22 | |||
23 | /** |
||
24 | * @var DenormalizerInterface |
||
25 | */ |
||
26 | private $denormalizer; |
||
27 | |||
28 | /** |
||
29 | * SerializerCommandExtractor constructor. |
||
30 | * @param SerializerInterface $serializer |
||
31 | * @param DecoderInterface $decoder |
||
32 | * @param DenormalizerInterface $denormalizer |
||
33 | */ |
||
34 | public function __construct( |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | * @throws \LogicException |
||
47 | * @throws \Symfony\Component\Serializer\Exception\UnexpectedValueException |
||
48 | */ |
||
49 | public function extractFromRequest(Request $request, string $commandClass, array $additionalProps = []) |
||
63 | } |
||
64 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.