@@ -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']; |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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, |
@@ -207,9 +207,9 @@ |
||
207 | 207 | $keyPredicate[strlen($keyPredicate) - 2] = ' '; |
208 | 208 | } else { |
209 | 209 | $idBits = explode('/', $id); |
210 | - $keyRaw = $idBits[count($idBits)-1]; |
|
210 | + $keyRaw = $idBits[count($idBits) - 1]; |
|
211 | 211 | $rawBits = explode('(', $keyRaw, 2); |
212 | - $rawBits = explode(')', $rawBits[count($rawBits)-1]); |
|
212 | + $rawBits = explode(')', $rawBits[count($rawBits) - 1]); |
|
213 | 213 | $keyPredicate = $rawBits[0]; |
214 | 214 | } |
215 | 215 | $keyPredicate = trim($keyPredicate); |
@@ -567,7 +567,7 @@ |
||
567 | 567 | $comma = null; |
568 | 568 | foreach ($keys as $keyName => $resourceProperty) { |
569 | 569 | if (!array_key_exists($keyName, $namedKeys)) { |
570 | - $msg = 'Key predicate '.$keyName.' not present in named values'; |
|
570 | + $msg = 'Key predicate ' . $keyName . ' not present in named values'; |
|
571 | 571 | throw new \InvalidArgumentException($msg); |
572 | 572 | } |
573 | 573 | $keyType = $resourceProperty->getInstanceType(); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $namespaceName = implode('.', $bitz); |
25 | 25 | } |
26 | 26 | $rawType = $entity->getBaseType(); |
27 | - $metaNamespace = $namespaceName.'.'; |
|
27 | + $metaNamespace = $namespaceName . '.'; |
|
28 | 28 | |
29 | 29 | $rawType = (null !== $rawType) ? str_replace($metaNamespace, '', $rawType) : null; |
30 | 30 | $baseType = null === $rawType ? null : $meta->resolveResourceType($rawType); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function setContentType($value) |
95 | 95 | { |
96 | - $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = $value.';charset=UTF-8'; |
|
96 | + $this->headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = $value . ';charset=UTF-8'; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function setStatusCode($value) |
166 | 166 | { |
167 | 167 | $rawCode = substr($value, 0, 3); |
168 | - assert(is_numeric($rawCode), 'Raw HTTP status code is not numeric - is '.$rawCode); |
|
168 | + assert(is_numeric($rawCode), 'Raw HTTP status code is not numeric - is ' . $rawCode); |
|
169 | 169 | $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] = $value; |
170 | 170 | $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_CODE] = intval($rawCode); |
171 | 171 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $value = $entryObject->$property; |
23 | 23 | } else { |
24 | 24 | if (null === $entryObject) { |
25 | - $msg = "Property POData\\Common\\ReflectionHandler::$".$property." does not exist"; |
|
25 | + $msg = "Property POData\\Common\\ReflectionHandler::$" . $property . " does not exist"; |
|
26 | 26 | throw new \ReflectionException($msg); |
27 | 27 | } |
28 | 28 | $reflectionProperty = new \ReflectionProperty(get_class($entryObject), $property); |
@@ -202,7 +202,7 @@ |
||
202 | 202 | $stackDex = count($trackStack) - 1; |
203 | 203 | assert( |
204 | 204 | self::MAX_EXPAND_TREE_DEPTH > $stackDex, |
205 | - 'Expansion stack too deep - should be less than '. self::MAX_EXPAND_TREE_DEPTH . 'elements' |
|
205 | + 'Expansion stack too deep - should be less than ' . self::MAX_EXPAND_TREE_DEPTH . 'elements' |
|
206 | 206 | ); |
207 | 207 | $topNode = $trackStack[$stackDex]; |
208 | 208 | /** @var ExpandedProjectionNode $rawNode */ |
@@ -76,6 +76,6 @@ |
||
76 | 76 | $this->eTag = $eTag; |
77 | 77 | $this->name = $name; |
78 | 78 | $this->srcLink = $srcLink; |
79 | - $this->rel = (null !== $rel) ? $rel : ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE.$name; |
|
79 | + $this->rel = (null !== $rel) ? $rel : ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
80 | 80 | } |
81 | 81 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | if (null !== $type) { |
180 | 180 | $rawTerm = $type->term; |
181 | 181 | $termArray = explode('.', $rawTerm); |
182 | - $final = $termArray[count($termArray)-1]; |
|
182 | + $final = $termArray[count($termArray) - 1]; |
|
183 | 183 | $this->resourceSetName = MetadataManager::getResourceSetNameFromResourceType($final); |
184 | 184 | } |
185 | 185 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $this->isMediaLinkEntry = true; |
255 | 255 | $this->mediaLink = $mediaLink; |
256 | 256 | } |
257 | - if (ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE == substr($mediaLink->rel, 0, 68)) { |
|
257 | + if (ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE == substr($mediaLink->rel, 0, 68)) { |
|
258 | 258 | $this->mediaLinks[] = $mediaLink; |
259 | 259 | } |
260 | 260 | if ('edit' == $mediaLink->rel) { |