@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->loadStackIfEmpty(); |
| 112 | 112 | |
| 113 | 113 | $stackCount = count($this->lightStack); |
| 114 | - $topOfStack = $this->lightStack[$stackCount-1]; |
|
| 114 | + $topOfStack = $this->lightStack[$stackCount - 1]; |
|
| 115 | 115 | $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack[0]); |
| 116 | 116 | assert($resourceType instanceof ResourceType, get_class($resourceType)); |
| 117 | 117 | $rawProp = $resourceType->getAllProperties(); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
| 173 | 173 | ); |
| 174 | 174 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
| 175 | - $propType = 'application/atom+xml;type='.$propTail; |
|
| 175 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
| 176 | 176 | $propName = $prop->getName(); |
| 177 | 177 | $nuLink->title = $propName; |
| 178 | 178 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * |
| 216 | 216 | * @return ODataFeed |
| 217 | 217 | */ |
| 218 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
| 218 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
| 219 | 219 | { |
| 220 | 220 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
| 221 | 221 | |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | * |
| 337 | 337 | * @return ODataPropertyContent |
| 338 | 338 | */ |
| 339 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
| 339 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
| 340 | 340 | { |
| 341 | 341 | $result = $complexValue->results; |
| 342 | 342 | |
@@ -364,14 +364,14 @@ discard block |
||
| 364 | 364 | * |
| 365 | 365 | * @return ODataPropertyContent |
| 366 | 366 | */ |
| 367 | - public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType) |
|
| 367 | + public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType) |
|
| 368 | 368 | { |
| 369 | 369 | $result = $bagValue->results; |
| 370 | 370 | |
| 371 | 371 | $propertyContent = new ODataPropertyContent(); |
| 372 | 372 | $odataProperty = new ODataProperty(); |
| 373 | 373 | $odataProperty->name = $propertyName; |
| 374 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
| 374 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
| 375 | 375 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
| 376 | 376 | |
| 377 | 377 | $propertyContent->properties[] = $odataProperty; |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | * |
| 387 | 387 | * @return ODataPropertyContent |
| 388 | 388 | */ |
| 389 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
| 389 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
| 390 | 390 | { |
| 391 | 391 | assert(null !== $resourceProperty, 'Resource property must not be null'); |
| 392 | 392 | $result = new ODataPropertyContent(); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | * @param $result |
| 469 | 469 | * @return ODataBagContent|null |
| 470 | 470 | */ |
| 471 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
| 471 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
| 472 | 472 | { |
| 473 | 473 | assert(null === $result || is_array($result), 'Bag parameter must be null or array'); |
| 474 | 474 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | * @param string|null $propertyName |
| 502 | 502 | * @return ODataPropertyContent |
| 503 | 503 | */ |
| 504 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
| 504 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
| 505 | 505 | { |
| 506 | 506 | assert(is_object($result), 'Supplied $customObject must be an object'); |
| 507 | 507 | |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
| 656 | 656 | assert(!is_null($skipToken), '!is_null($skipToken)'); |
| 657 | 657 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
| 658 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
| 658 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
| 659 | 659 | |
| 660 | 660 | return $skipToken; |
| 661 | 661 | } |
@@ -905,7 +905,7 @@ discard block |
||
| 905 | 905 | * |
| 906 | 906 | * @return string |
| 907 | 907 | */ |
| 908 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
| 908 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
| 909 | 909 | { |
| 910 | 910 | if ($type instanceof Boolean) { |
| 911 | 911 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -930,6 +930,6 @@ discard block |
||
| 930 | 930 | if (28 < $resourceKind) { |
| 931 | 931 | return false; |
| 932 | 932 | } |
| 933 | - return 0 == ($resourceKind % 4); |
|
| 933 | + return 0 == ($resourceKind%4); |
|
| 934 | 934 | } |
| 935 | 935 | } |