@@ -48,17 +48,17 @@ |
||
48 | 48 | $parsedHeaders = $this->headerParser->parse($serverRequest->getHeaders()); |
49 | 49 | |
50 | 50 | $urlQueryData = []; |
51 | - if($urlQueryString = $parsedURL->getQueryString()) { |
|
51 | + if ($urlQueryString = $parsedURL->getQueryString()) { |
|
52 | 52 | parse_str($urlQueryString, $urlQueryData); |
53 | 53 | |
54 | 54 | //In case it's unable to be parsed, default to no params |
55 | - if($urlQueryData === null) { |
|
55 | + if ($urlQueryData === null) { |
|
56 | 56 | $urlQueryData = []; |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | 60 | $apiKey = $parsedURL->getAPIKey(); |
61 | - if($apiKey === null) { |
|
61 | + if ($apiKey === null) { |
|
62 | 62 | $apiKey = $parsedHeaders->getAPIKey(); |
63 | 63 | } |
64 | 64 |
@@ -28,8 +28,7 @@ |
||
28 | 28 | * @param URLParser $URLParser |
29 | 29 | * @param HeaderParser $headerParser |
30 | 30 | */ |
31 | - public function __construct(URLParser $URLParser, HeaderParser $headerParser) |
|
32 | - { |
|
31 | + public function __construct(URLParser $URLParser, HeaderParser $headerParser) { |
|
33 | 32 | $this->URLParser = $URLParser; |
34 | 33 | $this->headerParser = $headerParser; |
35 | 34 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | { |
48 | 48 | foreach ($headers as $key => $values) { |
49 | 49 | if (strtolower($key) == strtolower($this->apiKeyHeaderKey)) { |
50 | - foreach($values as $value) { |
|
50 | + foreach ($values as $value) { |
|
51 | 51 | return $value; |
52 | 52 | } |
53 | 53 | } |