Conditions | 5 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | private function negotiateHeader($accept, AbstractNegotiator $negotiator, array $priorities) |
||
22 | { |
||
23 | if (empty($accept) || empty($priorities)) { |
||
24 | return; |
||
25 | } |
||
26 | |||
27 | try { |
||
28 | $best = $negotiator->getBest($accept, $priorities); |
||
29 | } catch (\Exception $exception) { |
||
30 | return; |
||
31 | } |
||
32 | |||
33 | if ($best) { |
||
34 | return $best->getValue(); |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 |