Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php |
||
46 | 7 | public function getDecoder(string $format): DecoderInterface |
|
47 | { |
||
48 | 7 | if (!$this->supports($format)) { |
|
49 | throw new \InvalidArgumentException(sprintf("Format '%s' is not supported by ContainerDecoderProvider.", $format)); |
||
50 | } |
||
51 | |||
52 | 7 | return $this->container->get($this->decoders[$format]); |
|
53 | } |
||
54 | } |
||
55 |