@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | } |
| 154 | 154 | // despite all set up, checking, etc, if we haven't picked a concrete resource type, |
| 155 | 155 | // wheels have fallen off, so blow up |
| 156 | - assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload '.$payloadClass); |
|
| 156 | + assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload ' . $payloadClass); |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | $rawProp = $resourceType->getAllProperties(); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
| 201 | 201 | ); |
| 202 | 202 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
| 203 | - $propType = 'application/atom+xml;type='.$propTail; |
|
| 203 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
| 204 | 204 | $propName = $prop->getName(); |
| 205 | 205 | $nuLink->title = $propName; |
| 206 | 206 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | * |
| 244 | 244 | * @return ODataFeed |
| 245 | 245 | */ |
| 246 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
| 246 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
| 247 | 247 | { |
| 248 | 248 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
| 249 | 249 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet(); |
| 281 | 281 | $requestTop = $this->getRequest()->getTopOptionCount(); |
| 282 | 282 | $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet); |
| 283 | - $requestTop = (null == $requestTop) ? $pageSize + 1 : $requestTop; |
|
| 283 | + $requestTop = (null == $requestTop) ? $pageSize+1 : $requestTop; |
|
| 284 | 284 | |
| 285 | 285 | if (true === $entryObjects->hasMore && $requestTop > $pageSize) { |
| 286 | 286 | $stackSegment = $setName; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | * |
| 364 | 364 | * @return ODataPropertyContent |
| 365 | 365 | */ |
| 366 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
| 366 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
| 367 | 367 | { |
| 368 | 368 | $result = $complexValue->results; |
| 369 | 369 | |
@@ -392,14 +392,14 @@ discard block |
||
| 392 | 392 | * bag object |
| 393 | 393 | * @return ODataPropertyContent |
| 394 | 394 | */ |
| 395 | - public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType) |
|
| 395 | + public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType) |
|
| 396 | 396 | { |
| 397 | 397 | $result = $BagValue->results; |
| 398 | 398 | |
| 399 | 399 | $propertyContent = new ODataPropertyContent(); |
| 400 | 400 | $odataProperty = new ODataProperty(); |
| 401 | 401 | $odataProperty->name = $propertyName; |
| 402 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
| 402 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
| 403 | 403 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
| 404 | 404 | |
| 405 | 405 | $propertyContent->properties[] = $odataProperty; |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | * primitive property to be written |
| 416 | 416 | * @return ODataPropertyContent |
| 417 | 417 | */ |
| 418 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
| 418 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
| 419 | 419 | { |
| 420 | 420 | assert(null != $resourceProperty, 'Resource property must not be null'); |
| 421 | 421 | $propertyContent = new ODataPropertyContent(); |
@@ -665,7 +665,7 @@ discard block |
||
| 665 | 665 | $segmentWrappers = $this->getStack()->getSegmentWrappers(); |
| 666 | 666 | $count = count($segmentWrappers); |
| 667 | 667 | |
| 668 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1]; |
|
| 668 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; |
|
| 669 | 669 | } |
| 670 | 670 | |
| 671 | 671 | /** |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
| 691 | 691 | assert(!is_null($skipToken), '!is_null($skipToken)'); |
| 692 | 692 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
| 693 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
| 693 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
| 694 | 694 | |
| 695 | 695 | return $skipToken; |
| 696 | 696 | } |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | |
| 725 | 725 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
| 726 | 726 | if (!is_null($topCountValue)) { |
| 727 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
| 727 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
| 728 | 728 | if (0 < $remainingCount) { |
| 729 | 729 | if (!is_null($queryParameterString)) { |
| 730 | 730 | $queryParameterString .= '&'; |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | * |
| 760 | 760 | * @return string |
| 761 | 761 | */ |
| 762 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
| 762 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
| 763 | 763 | { |
| 764 | 764 | if ($type instanceof Boolean) { |
| 765 | 765 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | * @param $result |
| 854 | 854 | * @return ODataBagContent|null |
| 855 | 855 | */ |
| 856 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
| 856 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
| 857 | 857 | { |
| 858 | 858 | assert(null == $result || is_array($result), 'Bag parameter must be null or array'); |
| 859 | 859 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -886,7 +886,7 @@ discard block |
||
| 886 | 886 | * @param string|null $propertyName |
| 887 | 887 | * @return ODataPropertyContent |
| 888 | 888 | */ |
| 889 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
| 889 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
| 890 | 890 | { |
| 891 | 891 | assert(is_object($result), 'Supplied $customObject must be an object'); |
| 892 | 892 | |