@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
170 | 170 | ); |
171 | 171 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
172 | - $propType = 'application/atom+xml;type='.$propTail; |
|
172 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
173 | 173 | $propName = $prop->getName(); |
174 | 174 | $nuLink->title = $propName; |
175 | 175 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * |
213 | 213 | * @return ODataFeed |
214 | 214 | */ |
215 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
215 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
216 | 216 | { |
217 | 217 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
218 | 218 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet(); |
250 | 250 | $requestTop = $this->getRequest()->getTopOptionCount(); |
251 | 251 | $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet); |
252 | - $requestTop = (null == $requestTop) ? $pageSize + 1 : $requestTop; |
|
252 | + $requestTop = (null == $requestTop) ? $pageSize+1 : $requestTop; |
|
253 | 253 | |
254 | 254 | if (true === $entryObjects->hasMore && $requestTop > $pageSize) { |
255 | 255 | $stackSegment = $setName; |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | * |
333 | 333 | * @return ODataPropertyContent |
334 | 334 | */ |
335 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
335 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
336 | 336 | { |
337 | 337 | $result = $complexValue->results; |
338 | 338 | |
@@ -361,14 +361,14 @@ discard block |
||
361 | 361 | * bag object |
362 | 362 | * @return ODataPropertyContent |
363 | 363 | */ |
364 | - public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType) |
|
364 | + public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType) |
|
365 | 365 | { |
366 | 366 | $result = $BagValue->results; |
367 | 367 | |
368 | 368 | $propertyContent = new ODataPropertyContent(); |
369 | 369 | $odataProperty = new ODataProperty(); |
370 | 370 | $odataProperty->name = $propertyName; |
371 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
371 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
372 | 372 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
373 | 373 | |
374 | 374 | $propertyContent->properties[] = $odataProperty; |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * primitive property to be written |
385 | 385 | * @return ODataPropertyContent |
386 | 386 | */ |
387 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
387 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
388 | 388 | { |
389 | 389 | assert(null != $resourceProperty, 'Resource property must not be null'); |
390 | 390 | $propertyContent = new ODataPropertyContent(); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $segmentWrappers = $this->getStack()->getSegmentWrappers(); |
635 | 635 | $count = count($segmentWrappers); |
636 | 636 | |
637 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1]; |
|
637 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; |
|
638 | 638 | } |
639 | 639 | |
640 | 640 | /** |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
660 | 660 | assert(!is_null($skipToken), '!is_null($skipToken)'); |
661 | 661 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
662 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
662 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
663 | 663 | |
664 | 664 | return $skipToken; |
665 | 665 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | |
694 | 694 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
695 | 695 | if (!is_null($topCountValue)) { |
696 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
696 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
697 | 697 | if (0 < $remainingCount) { |
698 | 698 | if (!is_null($queryParameterString)) { |
699 | 699 | $queryParameterString .= '&'; |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | * |
729 | 729 | * @return string |
730 | 730 | */ |
731 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
731 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
732 | 732 | { |
733 | 733 | if ($type instanceof Boolean) { |
734 | 734 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | * @param $result |
823 | 823 | * @return ODataBagContent |
824 | 824 | */ |
825 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
825 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
826 | 826 | { |
827 | 827 | assert(null == $result || is_array($result), 'Bag parameter must be null or array'); |
828 | 828 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | * @param string|null $propertyName |
856 | 856 | * @return ODataPropertyContent |
857 | 857 | */ |
858 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
858 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
859 | 859 | { |
860 | 860 | assert(is_object($result), 'Supplied $customObject must be an object'); |
861 | 861 |