Completed
Push — master ( e6380a...943e75 )
by Alex
13s queued 11s
created
src/POData/BatchProcessor/ChangeSetParser.php 1 patch
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     protected $changeSetBoundary;
18 18
     protected $rawRequests = [];
19 19
     protected $service;
20
-    protected $contentIDToLocationLookup =[];
20
+    protected $contentIDToLocationLookup = [];
21 21
 
22 22
     /**
23 23
      * ChangeSetParser constructor.
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
             $this->processSubRequest($workingObject);
68 68
             if ('GET' != $workingObject->RequestVerb && !Str::contains($workingObject->RequestURL, '/$links/')) {
69 69
                 if (null === $workingObject->Response->getHeaders()['Location']) {
70
-                    $msg = 'Location header not set in subrequest response for '. $workingObject->RequestVerb
71
-                           .' request url '.$workingObject->RequestURL;
70
+                    $msg = 'Location header not set in subrequest response for ' . $workingObject->RequestVerb
71
+                           .' request url ' . $workingObject->RequestURL;
72 72
                     throw new \Exception($msg);
73 73
                 }
74 74
                 $this->contentIDToLocationLookup[$contentID] = $workingObject->Response->getHeaders()['Location'];
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
             $response .= 'Content-Type: application/http' . "\r\n";
92 92
             $response .= 'Content-Transfer-Encoding: binary' . "\r\n";
93 93
             $response .= "\r\n";
94
-            $response .= 'HTTP/1.1 '.$headers['Status']."\r\n";
95
-            $response .= 'Content-ID: '.$contentID . "\r\n";
94
+            $response .= 'HTTP/1.1 ' . $headers['Status'] . "\r\n";
95
+            $response .= 'Content-ID: ' . $contentID . "\r\n";
96 96
 
97 97
             foreach ($headers as $headerName => $headerValue) {
98 98
                 if (null !== $headerValue) {
@@ -106,8 +106,7 @@  discard block
 block discarded – undo
106 106
         $response .= false === $this->changeSetBoundary ? "\r\n" : "--\r\n";
107 107
         $response = 'Content-Length: ' . strlen($response) . "\r\n\r\n" . $response;
108 108
         $response = false === $this->changeSetBoundary ?
109
-            $response :
110
-            'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response;
109
+            $response : 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response;
111 110
         return $response;
112 111
     }
113 112
 
@@ -164,7 +163,7 @@  discard block
 block discarded – undo
164 163
                         }
165 164
                         $headerSides = explode(':', $line);
166 165
                         if (count($headerSides) != 2) {
167
-                            throw new \Exception('Malformed header line: '.$line);
166
+                            throw new \Exception('Malformed header line: ' . $line);
168 167
                         }
169 168
                         if (strtolower(trim($headerSides[0])) == strtolower('Content-ID')) {
170 169
                             $contentID = trim($headerSides[1]);
@@ -191,7 +190,7 @@  discard block
 block discarded – undo
191 190
             if ($contentIDinit == $contentID) {
192 191
                 $contentIDinit--;
193 192
             }
194
-            $this->rawRequests[$contentID] = (object)[
193
+            $this->rawRequests[$contentID] = (object) [
195 194
                 'RequestVerb' => $requestPathParts[0],
196 195
                 'RequestURL' => $requestPathParts[1],
197 196
                 'ServerParams' => $serverParts,
Please login to merge, or discard this patch.