@@ -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 | $nodes = $topNode['node']->getChildNodes(); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | public function getResponse() |
57 | 57 | { |
58 | 58 | $response = ''; |
59 | - $splitter = '--' . $this->batchBoundary . "\r\n"; |
|
59 | + $splitter = '--' . $this->batchBoundary . "\r\n"; |
|
60 | 60 | $raw = $this->changeSetProcessors; |
61 | 61 | foreach ($raw as $contentID => &$workingObject) { |
62 | 62 | $response .= $splitter; |
@@ -82,7 +82,7 @@ |
||
82 | 82 | } |
83 | 83 | $segments = $request->getSegments(); |
84 | 84 | $numSeg = count($segments); |
85 | - if (1 < $numSeg && '$links' == $segments[$numSeg-2]->getIdentifier()) { |
|
85 | + if (1 < $numSeg && '$links' == $segments[$numSeg - 2]->getIdentifier()) { |
|
86 | 86 | if (null !== $entityModel) { |
87 | 87 | throw new \Exception(Messages::modelPayloadOnLinkModification()); |
88 | 88 | } |
@@ -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, |
@@ -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(); |
@@ -174,7 +174,7 @@ |
||
174 | 174 | if (null !== $type) { |
175 | 175 | $rawTerm = $type->term; |
176 | 176 | $termArray = explode('.', $rawTerm); |
177 | - $final = $termArray[count($termArray)-1]; |
|
177 | + $final = $termArray[count($termArray) - 1]; |
|
178 | 178 | $this->resourceSetName = MetadataManager::getResourceSetNameFromResourceType($final); |
179 | 179 | } |
180 | 180 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $this->isBaseWritten = true; |
131 | 131 | |
132 | 132 | $stackCount = count($this->lightStack); |
133 | - $topOfStack = $this->lightStack[$stackCount-1]; |
|
133 | + $topOfStack = $this->lightStack[$stackCount - 1]; |
|
134 | 134 | $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack['type']); |
135 | 135 | assert($resourceType instanceof ResourceType, get_class($resourceType)); |
136 | 136 | $rawProp = $resourceType->getAllProperties(); |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | $nonRelCount = count($nonRelProp); |
153 | 153 | assert( |
154 | 154 | $rawCount == $relCount + $nonRelCount, |
155 | - 'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount |
|
156 | - .', and nonRelPropCount,'.$nonRelCount |
|
155 | + 'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount |
|
156 | + .', and nonRelPropCount,' . $nonRelCount |
|
157 | 157 | ); |
158 | 158 | |
159 | 159 | // now mask off against projNodes |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | ); |
202 | 202 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
203 | 203 | $nuLink->isCollection = 'feed' === $propTail; |
204 | - $propType = 'application/atom+xml;type='.$propTail; |
|
204 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
205 | 205 | $propName = $prop->getName(); |
206 | 206 | $nuLink->title = $propName; |
207 | 207 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | $newCount == $stackCount, |
243 | 243 | 'Should have ' . $stackCount . 'elements in stack, have ' . $newCount . 'elements' |
244 | 244 | ); |
245 | - $this->lightStack[$newCount-1]['count']--; |
|
246 | - if (0 == $this->lightStack[$newCount-1]['count']) { |
|
245 | + $this->lightStack[$newCount - 1]['count']--; |
|
246 | + if (0 == $this->lightStack[$newCount - 1]['count']) { |
|
247 | 247 | array_pop($this->lightStack); |
248 | 248 | } |
249 | 249 | return $odata; |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | $propertyContent = new ODataPropertyContent(); |
430 | 430 | $odataProperty = new ODataProperty(); |
431 | 431 | $odataProperty->name = $propertyName; |
432 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
432 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
433 | 433 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
434 | 434 | |
435 | 435 | $propertyContent->properties[$propertyName] = $odataProperty; |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
725 | 725 | assert(null !== $skipToken, '!is_null($skipToken)'); |
726 | 726 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
727 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
727 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
728 | 728 | |
729 | 729 | return $skipToken; |
730 | 730 | } |
@@ -1012,6 +1012,6 @@ discard block |
||
1012 | 1012 | if (28 < $resourceKind) { |
1013 | 1013 | return false; |
1014 | 1014 | } |
1015 | - return 0 == ($resourceKind % 4); |
|
1015 | + return 0 == ($resourceKind%4); |
|
1016 | 1016 | } |
1017 | 1017 | } |
@@ -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); |