@@ -51,7 +51,7 @@ |
||
51 | 51 | if ('GET' != $workingObject->RequestVerb && !Str::contains($workingObject->RequestURL, '/$links/')) { |
52 | 52 | if (null === $workingObject->Response->getHeaders()['Location']) { |
53 | 53 | $msg = 'Location header not set in subrequest response for '. $workingObject->RequestVerb |
54 | - .' request url '.$workingObject->RequestURL; |
|
54 | + .' request url '.$workingObject->RequestURL; |
|
55 | 55 | throw new \Exception($msg); |
56 | 56 | } |
57 | 57 | $this->contentIDToLocationLookup[$contentID] = $workingObject->Response->getHeaders()['Location']; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | protected $changeSetBoundary; |
14 | 14 | protected $rawRequests = []; |
15 | 15 | protected $service; |
16 | - protected $contentIDToLocationLookup =[]; |
|
16 | + protected $contentIDToLocationLookup = []; |
|
17 | 17 | |
18 | 18 | public function __construct(BaseService $service, $body) |
19 | 19 | { |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | $this->processSubRequest($workingObject); |
51 | 51 | if ('GET' != $workingObject->RequestVerb && !Str::contains($workingObject->RequestURL, '/$links/')) { |
52 | 52 | if (null === $workingObject->Response->getHeaders()['Location']) { |
53 | - $msg = 'Location header not set in subrequest response for '. $workingObject->RequestVerb |
|
54 | - .' request url '.$workingObject->RequestURL; |
|
53 | + $msg = 'Location header not set in subrequest response for ' . $workingObject->RequestVerb |
|
54 | + .' request url ' . $workingObject->RequestURL; |
|
55 | 55 | throw new \Exception($msg); |
56 | 56 | } |
57 | 57 | $this->contentIDToLocationLookup[$contentID] = $workingObject->Response->getHeaders()['Location']; |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | $response .= 'Content-Type: application/http' . "\r\n"; |
72 | 72 | $response .= 'Content-Transfer-Encoding: binary' . "\r\n"; |
73 | 73 | $response .= "\r\n"; |
74 | - $response .= 'HTTP/1.1 '.$headers['Status']."\r\n"; |
|
75 | - $response .= 'Content-ID: '.$contentID . "\r\n"; |
|
74 | + $response .= 'HTTP/1.1 ' . $headers['Status'] . "\r\n"; |
|
75 | + $response .= 'Content-ID: ' . $contentID . "\r\n"; |
|
76 | 76 | |
77 | 77 | foreach ($headers as $headerName => $headerValue) { |
78 | 78 | if (null !== $headerValue) { |
@@ -86,8 +86,7 @@ discard block |
||
86 | 86 | $response .= false === $this->changeSetBoundary ? "\r\n" : "--\r\n"; |
87 | 87 | $response = 'Content-Length: ' . strlen($response) . "\r\n\r\n" . $response; |
88 | 88 | $response = false === $this->changeSetBoundary ? |
89 | - $response : |
|
90 | - 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response; |
|
89 | + $response : 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response; |
|
91 | 90 | return $response; |
92 | 91 | } |
93 | 92 | |
@@ -141,7 +140,7 @@ discard block |
||
141 | 140 | } |
142 | 141 | $headerSides = explode(':', $line); |
143 | 142 | if (count($headerSides) != 2) { |
144 | - throw new \Exception('Malformed header line: '.$line); |
|
143 | + throw new \Exception('Malformed header line: ' . $line); |
|
145 | 144 | } |
146 | 145 | if (strtolower(trim($headerSides[0])) == strtolower('Content-ID')) { |
147 | 146 | $contentID = trim($headerSides[1]); |
@@ -168,7 +167,7 @@ discard block |
||
168 | 167 | if ($contentIDinit == $contentID) { |
169 | 168 | $contentIDinit--; |
170 | 169 | } |
171 | - $this->rawRequests[$contentID] = (object)[ |
|
170 | + $this->rawRequests[$contentID] = (object) [ |
|
172 | 171 | 'RequestVerb' => $requestPathParts[0], |
173 | 172 | 'RequestURL' => $requestPathParts[1], |
174 | 173 | 'ServerParams' => $serverParts, |