Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function getFormat(string $contentType): ?string |
||
28 | { |
||
29 | foreach ($this->formatRetrievers as $formatRetriever) { |
||
30 | $res = $formatRetriever->getFormat($contentType); |
||
31 | if (!is_null($res)) { |
||
32 | return $res; |
||
33 | } |
||
34 | } |
||
35 | throw new NotAcceptableHttpException('"' . $contentType . '" is not accepted'); |
||
36 | } |
||
53 |