@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $this->isBaseWritten = true; |
| 129 | 129 | |
| 130 | 130 | $stackCount = count($this->lightStack); |
| 131 | - $topOfStack = $this->lightStack[$stackCount-1]; |
|
| 131 | + $topOfStack = $this->lightStack[$stackCount - 1]; |
|
| 132 | 132 | $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack['type']); |
| 133 | 133 | assert($resourceType instanceof ResourceType, get_class($resourceType)); |
| 134 | 134 | $rawProp = $resourceType->getAllProperties(); |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | $nonRelCount = count($nonRelProp); |
| 151 | 151 | assert( |
| 152 | 152 | $rawCount == $relCount + $nonRelCount, |
| 153 | - 'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount |
|
| 154 | - .', and nonRelPropCount,'.$nonRelCount |
|
| 153 | + 'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount |
|
| 154 | + .', and nonRelPropCount,' . $nonRelCount |
|
| 155 | 155 | ); |
| 156 | 156 | |
| 157 | 157 | // now mask off against projNodes |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
| 199 | 199 | ); |
| 200 | 200 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
| 201 | - $propType = 'application/atom+xml;type='.$propTail; |
|
| 201 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
| 202 | 202 | $propName = $prop->getName(); |
| 203 | 203 | $nuLink->title = $propName; |
| 204 | 204 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -235,8 +235,8 @@ discard block |
||
| 235 | 235 | $newCount == $stackCount, |
| 236 | 236 | 'Should have ' . $stackCount . 'elements in stack, have ' . $newCount . 'elements' |
| 237 | 237 | ); |
| 238 | - $this->lightStack[$newCount-1]['count']--; |
|
| 239 | - if (0 == $this->lightStack[$newCount-1]['count']) { |
|
| 238 | + $this->lightStack[$newCount - 1]['count']--; |
|
| 239 | + if (0 == $this->lightStack[$newCount - 1]['count']) { |
|
| 240 | 240 | array_pop($this->lightStack); |
| 241 | 241 | } |
| 242 | 242 | return $odata; |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | * |
| 250 | 250 | * @return ODataFeed |
| 251 | 251 | */ |
| 252 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
| 252 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
| 253 | 253 | { |
| 254 | 254 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
| 255 | 255 | |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | * |
| 375 | 375 | * @return ODataPropertyContent |
| 376 | 376 | */ |
| 377 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
| 377 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
| 378 | 378 | { |
| 379 | 379 | $result = $complexValue->results; |
| 380 | 380 | |
@@ -402,14 +402,14 @@ discard block |
||
| 402 | 402 | * |
| 403 | 403 | * @return ODataPropertyContent |
| 404 | 404 | */ |
| 405 | - public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType) |
|
| 405 | + public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType) |
|
| 406 | 406 | { |
| 407 | 407 | $result = $bagValue->results; |
| 408 | 408 | |
| 409 | 409 | $propertyContent = new ODataPropertyContent(); |
| 410 | 410 | $odataProperty = new ODataProperty(); |
| 411 | 411 | $odataProperty->name = $propertyName; |
| 412 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
| 412 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
| 413 | 413 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
| 414 | 414 | |
| 415 | 415 | $propertyContent->properties[$propertyName] = $odataProperty; |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | * |
| 425 | 425 | * @return ODataPropertyContent |
| 426 | 426 | */ |
| 427 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
| 427 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
| 428 | 428 | { |
| 429 | 429 | assert(null !== $resourceProperty, 'Resource property must not be null'); |
| 430 | 430 | $result = new ODataPropertyContent(); |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | * @param $result |
| 517 | 517 | * @return ODataBagContent|null |
| 518 | 518 | */ |
| 519 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
| 519 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
| 520 | 520 | { |
| 521 | 521 | assert(null === $result || is_array($result), 'Bag parameter must be null or array'); |
| 522 | 522 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | * @param string|null $propertyName |
| 550 | 550 | * @return ODataPropertyContent |
| 551 | 551 | */ |
| 552 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
| 552 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
| 553 | 553 | { |
| 554 | 554 | assert(is_object($result), 'Supplied $customObject must be an object'); |
| 555 | 555 | |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
| 704 | 704 | assert(null !== $skipToken, '!is_null($skipToken)'); |
| 705 | 705 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
| 706 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
| 706 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
| 707 | 707 | |
| 708 | 708 | return $skipToken; |
| 709 | 709 | } |
@@ -958,7 +958,7 @@ discard block |
||
| 958 | 958 | * |
| 959 | 959 | * @return string |
| 960 | 960 | */ |
| 961 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
| 961 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
| 962 | 962 | { |
| 963 | 963 | if ($type instanceof Boolean) { |
| 964 | 964 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -983,6 +983,6 @@ discard block |
||
| 983 | 983 | if (28 < $resourceKind) { |
| 984 | 984 | return false; |
| 985 | 985 | } |
| 986 | - return 0 == ($resourceKind % 4); |
|
| 986 | + return 0 == ($resourceKind%4); |
|
| 987 | 987 | } |
| 988 | 988 | } |
@@ -221,7 +221,7 @@ |
||
| 221 | 221 | * @param \POData\ObjectModel\ODataMediaLink $mediaLink |
| 222 | 222 | * @param \POData\ObjectModel\ODataMediaLink|null $editLink |
| 223 | 223 | */ |
| 224 | - private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink &$editLink = null) |
|
| 224 | + private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink & $editLink = null) |
|
| 225 | 225 | { |
| 226 | 226 | if ('edit-media' == $mediaLink->rel) { |
| 227 | 227 | $this->isMediaLinkEntry = true; |