Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
29 | private function prepRequest(RequestInterface $request) |
||
30 | { |
||
31 | // Requested URI |
||
32 | $uri = $request->getUri(); |
||
33 | |||
34 | // Get Query |
||
35 | $query = $uri->getQuery(); |
||
36 | |||
37 | // Append to? |
||
38 | if (!empty($query)) { |
||
39 | $query .= '&'; |
||
40 | } |
||
41 | |||
42 | // Add our key |
||
43 | $query .= http_build_query([ |
||
44 | 'hapikey' => $this->key |
||
45 | ]); |
||
46 | |||
47 | return $request->withUri( |
||
48 | $uri->withQuery($query) |
||
49 | ); |
||
50 | } |
||
51 | } |
||
52 |