Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
31 | 1 | public function visit( |
|
32 | ResultInterface $result, |
||
33 | ResponseInterface $response, |
||
34 | Parameter $param |
||
35 | ) { |
||
36 | // Retrieving a single header by name |
||
37 | 1 | $name = $param->getName(); |
|
|
|||
38 | 1 | if ($header = $response->getHeader($param->getWireName())) { |
|
39 | 1 | if (is_array($header)) { |
|
40 | 1 | $header = array_shift($header); |
|
41 | 1 | } |
|
42 | 1 | $result[$name] = $param->filter($header); |
|
43 | 1 | } |
|
44 | |||
45 | 1 | return $result; |
|
46 | } |
||
47 | } |
||
48 |