@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $this->isBaseWritten = true; |
130 | 130 | |
131 | 131 | $stackCount = count($this->lightStack); |
132 | - $topOfStack = $this->lightStack[$stackCount-1]; |
|
132 | + $topOfStack = $this->lightStack[$stackCount - 1]; |
|
133 | 133 | $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack['type']); |
134 | 134 | assert($resourceType instanceof ResourceType, get_class($resourceType)); |
135 | 135 | $rawProp = $resourceType->getAllProperties(); |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | $nonRelCount = count($nonRelProp); |
152 | 152 | assert( |
153 | 153 | $rawCount == $relCount + $nonRelCount, |
154 | - 'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount |
|
155 | - .', and nonRelPropCount,'.$nonRelCount |
|
154 | + 'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount |
|
155 | + .', and nonRelPropCount,' . $nonRelCount |
|
156 | 156 | ); |
157 | 157 | |
158 | 158 | // now mask off against projNodes |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
200 | 200 | ); |
201 | 201 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
202 | - $propType = 'application/atom+xml;type='.$propTail; |
|
202 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
203 | 203 | $propName = $prop->getName(); |
204 | 204 | $nuLink->title = $propName; |
205 | 205 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -236,8 +236,8 @@ discard block |
||
236 | 236 | $newCount == $stackCount, |
237 | 237 | 'Should have ' . $stackCount . 'elements in stack, have ' . $newCount . 'elements' |
238 | 238 | ); |
239 | - $this->lightStack[$newCount-1]['count']--; |
|
240 | - if (0 == $this->lightStack[$newCount-1]['count']) { |
|
239 | + $this->lightStack[$newCount - 1]['count']--; |
|
240 | + if (0 == $this->lightStack[$newCount - 1]['count']) { |
|
241 | 241 | array_pop($this->lightStack); |
242 | 242 | } |
243 | 243 | return $odata; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | * |
251 | 251 | * @return ODataFeed |
252 | 252 | */ |
253 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
253 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
254 | 254 | { |
255 | 255 | $res = $entryObjects->results; |
256 | 256 | assert(is_array($res) || $res instanceof Collection, '!is_array($entryObjects->results)'); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | * |
377 | 377 | * @return ODataPropertyContent |
378 | 378 | */ |
379 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
379 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
380 | 380 | { |
381 | 381 | $result = $complexValue->results; |
382 | 382 | |
@@ -404,14 +404,14 @@ discard block |
||
404 | 404 | * |
405 | 405 | * @return ODataPropertyContent |
406 | 406 | */ |
407 | - public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType) |
|
407 | + public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType) |
|
408 | 408 | { |
409 | 409 | $result = $bagValue->results; |
410 | 410 | |
411 | 411 | $propertyContent = new ODataPropertyContent(); |
412 | 412 | $odataProperty = new ODataProperty(); |
413 | 413 | $odataProperty->name = $propertyName; |
414 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
414 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
415 | 415 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
416 | 416 | |
417 | 417 | $propertyContent->properties[$propertyName] = $odataProperty; |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | * |
427 | 427 | * @return ODataPropertyContent |
428 | 428 | */ |
429 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
429 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
430 | 430 | { |
431 | 431 | assert(null !== $resourceProperty, 'Resource property must not be null'); |
432 | 432 | $result = new ODataPropertyContent(); |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | * @param $result |
519 | 519 | * @return ODataBagContent|null |
520 | 520 | */ |
521 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
521 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
522 | 522 | { |
523 | 523 | assert(null === $result || is_array($result), 'Bag parameter must be null or array'); |
524 | 524 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | * @param string|null $propertyName |
552 | 552 | * @return ODataPropertyContent |
553 | 553 | */ |
554 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
554 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
555 | 555 | { |
556 | 556 | assert(is_object($result), 'Supplied $customObject must be an object'); |
557 | 557 | |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
706 | 706 | assert(null !== $skipToken, '!is_null($skipToken)'); |
707 | 707 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
708 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
708 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
709 | 709 | |
710 | 710 | return $skipToken; |
711 | 711 | } |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | * |
961 | 961 | * @return string |
962 | 962 | */ |
963 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
963 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
964 | 964 | { |
965 | 965 | if ($type instanceof Boolean) { |
966 | 966 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -985,6 +985,6 @@ discard block |
||
985 | 985 | if (28 < $resourceKind) { |
986 | 986 | return false; |
987 | 987 | } |
988 | - return 0 == ($resourceKind % 4); |
|
988 | + return 0 == ($resourceKind%4); |
|
989 | 989 | } |
990 | 990 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | $payloadType = $payload->type->term; |
36 | 36 | $pay = explode('.', $payloadType); |
37 | - $payloadType = $pay[count($pay)-1]; |
|
37 | + $payloadType = $pay[count($pay) - 1]; |
|
38 | 38 | $actualType = $entityType->getName(); |
39 | 39 | |
40 | 40 | if ($payloadType !== $actualType) { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | if (null !== $type) { |
174 | 174 | $rawTerm = $type->term; |
175 | 175 | $termArray = explode('.', $rawTerm); |
176 | - $this->resourceSetName = Str::plural($termArray[count($termArray)-1]); |
|
176 | + $this->resourceSetName = Str::plural($termArray[count($termArray) - 1]); |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | * @param \POData\ObjectModel\ODataMediaLink $mediaLink |
239 | 239 | * @param \POData\ObjectModel\ODataMediaLink|null $editLink |
240 | 240 | */ |
241 | - private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink &$editLink = null) |
|
241 | + private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink & $editLink = null) |
|
242 | 242 | { |
243 | 243 | if ('edit-media' == $mediaLink->rel) { |
244 | 244 | $this->isMediaLinkEntry = true; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * @param ODataEntry $payload |
39 | 39 | */ |
40 | - public function processPayload(ODataEntry &$payload) |
|
40 | + public function processPayload(ODataEntry & $payload) |
|
41 | 41 | { |
42 | 42 | assert($this->isEntryOK($payload)); |
43 | 43 | list($sourceSet, $source) = $this->processEntryContent($payload); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | return true; |
90 | 90 | } |
91 | 91 | |
92 | - protected function processEntryContent(ODataEntry &$content) |
|
92 | + protected function processEntryContent(ODataEntry & $content) |
|
93 | 93 | { |
94 | 94 | assert(null === $content->id || is_string($content->id), 'Entry id must be null or string'); |
95 | 95 | |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | $keyPredicate[strlen($keyPredicate) - 2] = ' '; |
165 | 165 | } else { |
166 | 166 | $idBits = explode('/', $id); |
167 | - $keyRaw = $idBits[count($idBits)-1]; |
|
167 | + $keyRaw = $idBits[count($idBits) - 1]; |
|
168 | 168 | $rawBits = explode('(', $keyRaw, 2); |
169 | - $rawBits = explode(')', $rawBits[count($rawBits)-1]); |
|
169 | + $rawBits = explode(')', $rawBits[count($rawBits) - 1]); |
|
170 | 170 | $keyPredicate = $rawBits[0]; |
171 | 171 | } |
172 | 172 | $keyPredicate = trim($keyPredicate); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | return $keyDesc; |
179 | 179 | } |
180 | 180 | |
181 | - protected function processLink(ODataLink &$link, ResourceSet $sourceSet, $source) |
|
181 | + protected function processLink(ODataLink & $link, ResourceSet $sourceSet, $source) |
|
182 | 182 | { |
183 | 183 | $hasUrl = isset($link->url); |
184 | 184 | $hasPayload = isset($link->expandedResult); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @param $hasUrl |
211 | 211 | * @param $hasPayload |
212 | 212 | */ |
213 | - protected function processLinkSingleton(ODataLink &$link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
213 | + protected function processLinkSingleton(ODataLink & $link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
214 | 214 | { |
215 | 215 | assert( |
216 | 216 | null === $link->expandedResult || $link->expandedResult instanceof ODataEntry, |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | return; |
267 | 267 | } |
268 | 268 | |
269 | - protected function processLinkFeed(ODataLink &$link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
269 | + protected function processLinkFeed(ODataLink & $link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
270 | 270 | { |
271 | 271 | assert( |
272 | 272 | $link->expandedResult instanceof ODataFeed, |