Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
48 | 2 | public function getUserAgent() : string |
|
49 | { |
||
50 | 2 | $userAgent = ''; |
|
51 | |||
52 | 2 | foreach ($this->userAgentHeaders as $header) { |
|
53 | 2 | if (array_key_exists($header, $this->source) |
|
54 | 1 | && $this->source[$header] |
|
55 | ) { |
||
56 | 1 | $userAgent = $this->cleanParam($this->source[$header]); |
|
57 | |||
58 | 1 | break; |
|
59 | } |
||
60 | } |
||
61 | |||
62 | 2 | return $userAgent; |
|
63 | } |
||
64 | |||
77 |