| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | 2 | public function transform(array $data, string $contentType): string |
|
| 52 | { |
||
| 53 | 2 | if (isset($this->transformers[$contentType])) { |
|
| 54 | 1 | return $this->transformers[$contentType]->transform($data); |
|
| 55 | } |
||
| 56 | |||
| 57 | 1 | throw new \InvalidArgumentException(sprintf('There is no transformer for content-type: %s', $contentType)); |
|
| 58 | } |
||
| 59 | } |
||
| 60 |