Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.0218 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 2 | private function attemptSettingContentType($instance) |
|
29 | { |
||
30 | 2 | $header = $this->request->getAcceptHeader(); |
|
31 | |||
32 | 2 | if ($header === null) { |
|
33 | 1 | return; |
|
34 | } |
||
35 | |||
36 | 1 | foreach ($this->contentTypes as $candidate) { |
|
37 | 1 | if ($header->contains($candidate)) { |
|
38 | 1 | $this->applyContentTypeHeader($instance, $candidate); |
|
39 | 1 | return; |
|
40 | } |
||
41 | } |
||
42 | } |
||
43 | |||
56 |