Conditions | 6 |
Paths | 5 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
43 | 5 | private function getSerializer(string $selector) |
|
44 | { |
||
45 | 5 | if (null === $this->symfonySerializer && null === $this->jmsSerializer) { |
|
46 | 1 | return null; |
|
47 | } |
||
48 | |||
49 | 4 | if ('auto' === $selector) { |
|
50 | 1 | return $this->jmsSerializer ?? $this->symfonySerializer; |
|
51 | } |
||
52 | |||
53 | 3 | if ('jms_serializer' === $selector) { |
|
54 | 1 | return $this->jmsSerializer; |
|
55 | } |
||
56 | |||
57 | 2 | if ('symfony_serializer' === $selector) { |
|
58 | 1 | return $this->symfonySerializer; |
|
59 | } |
||
60 | |||
61 | 1 | return null; |
|
62 | } |
||
64 |