Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.5 |
1 | <?php |
||
49 | 7 | public function getDecoder($format) |
|
50 | { |
||
51 | 7 | if (!$this->supports($format)) { |
|
52 | throw new \InvalidArgumentException( |
||
53 | sprintf("Format '%s' is not supported by ContainerDecoderProvider.", $format) |
||
54 | ); |
||
55 | } |
||
56 | |||
57 | 7 | return $this->container->get($this->decoders[$format]); |
|
58 | } |
||
59 | } |
||
60 |