Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | protected function verifyContentType() |
||
27 | { |
||
28 | $clientContentTypes = $this->request->getAcceptContentTypes(); |
||
|
|||
29 | if (array_key_exists(0, $clientContentTypes)) { |
||
30 | unset($clientContentTypes[0]); // $q == 0 means, that mime-type isn’t supported! |
||
31 | } |
||
32 | $supportedContentTypes = $this->getSupportedContentTypes(); |
||
33 | $intersection = array_intersect($clientContentTypes, $supportedContentTypes); |
||
34 | if (empty($intersection)) { |
||
35 | throw new \WebServCo\Framework\Exceptions\UnsupportedMediaTypeException('Unsupported content type'); |
||
36 | } |
||
37 | return true; |
||
38 | } |
||
57 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.