Completed
Push — master ( 068584...6f6103 )
by John
04:49
created
src/APIRequest/APIRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@
 block discarded – undo
55 55
     public function __construct(
56 56
         string $method,
57 57
         string $endpoint,
58
-        ?string $element,
58
+        ? string $element,
59 59
         array $acceptableMIMETypes,
60
-        ?string $version,
61
-        ?string $apiKey,
60
+        ? string $version,
61
+        ? string $apiKey,
62 62
         array $queryData,
63 63
         $data
64 64
     ) {
Please login to merge, or discard this patch.
src/APIRequest/URLParser/ParsedURL.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      * @param array $acceptableMIMETypes
38 38
      * @param null|string $queryString
39 39
      */
40
-    public function __construct(string $endpoint, ?string $element, ?string $version, ?string $apiKey, array $acceptableMIMETypes, ?string $queryString)
40
+    public function __construct(string $endpoint, ? string $element, ? string $version, ? string $apiKey, array $acceptableMIMETypes, ? string $queryString)
41 41
     {
42 42
         $this->endpoint = $endpoint;
43 43
         $this->element = $element;
Please login to merge, or discard this patch.
src/Server/HTTPServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
         }
91 91
 
92 92
         $body = $response->getBody();
93
-        while(!$body->eof()) {
93
+        while (!$body->eof()) {
94 94
             echo $body->read(1024);
95 95
         }
96 96
     }
Please login to merge, or discard this patch.
src/APIRequest/HeaderParser/DefaultHeaderParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Server/GenericRouter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
     {
48 48
         $method = $this->mapEndpointMethod($request);
49 49
         if (!method_exists($endpoint, $method)) {
50
-            throw new MethodNotFoundException("The endpoint method " . $method . " was not found");
50
+            throw new MethodNotFoundException("The endpoint method ".$method." was not found");
51 51
         }
52 52
         return call_user_func([$endpoint, $method], $request);
53 53
     }
54 54
 
55 55
     protected function mapEndpointMethod(APIRequest $request): string
56 56
     {
57
-        return strtolower($request->getMethod()) . (!$request->getElement() ? 'All': '');
57
+        return strtolower($request->getMethod()).(!$request->getElement() ? 'All' : '');
58 58
     }
59 59
 }
Please login to merge, or discard this patch.
src/APIRequest/RequestFactory/GenericRequestFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
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
 
55 55
         $apiKey = $parsedURL->getAPIKey();
56
-        if($apiKey === null) {
56
+        if ($apiKey === null) {
57 57
             $apiKey = $parsedHeaders->getAPIKey();
58 58
         }
59 59
 
Please login to merge, or discard this patch.