@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | // despite all set up, checking, etc, if we haven't picked a concrete resource type, |
157 | 157 | // wheels have fallen off, so blow up |
158 | - assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload '.$payloadClass); |
|
158 | + assert(!$resourceType->isAbstract(), 'Concrete resource type not selected for payload ' . $payloadClass); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | // make sure we're barking up right tree |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $targClass = $resourceType->getInstanceType()->getName(); |
164 | 164 | assert( |
165 | 165 | $entryObject->results instanceof $targClass, |
166 | - 'Object being serialised not instance of expected class, '.$targClass. ', is actually '.$payloadClass |
|
166 | + 'Object being serialised not instance of expected class, ' . $targClass . ', is actually ' . $payloadClass |
|
167 | 167 | ); |
168 | 168 | |
169 | 169 | $rawProp = $resourceType->getAllProperties(); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
211 | 211 | ); |
212 | 212 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
213 | - $propType = 'application/atom+xml;type='.$propTail; |
|
213 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
214 | 214 | $propName = $prop->getName(); |
215 | 215 | $nuLink->title = $propName; |
216 | 216 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | * |
257 | 257 | * @return ODataFeed |
258 | 258 | */ |
259 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
259 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
260 | 260 | { |
261 | 261 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
262 | 262 | |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet(); |
294 | 294 | $requestTop = $this->getRequest()->getTopOptionCount(); |
295 | 295 | $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet); |
296 | - $requestTop = (null == $requestTop) ? $pageSize + 1 : $requestTop; |
|
296 | + $requestTop = (null == $requestTop) ? $pageSize+1 : $requestTop; |
|
297 | 297 | |
298 | 298 | if (true === $entryObjects->hasMore && $requestTop > $pageSize) { |
299 | 299 | $stackSegment = $setName; |
@@ -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 | |
@@ -405,14 +405,14 @@ discard block |
||
405 | 405 | * bag object |
406 | 406 | * @return ODataPropertyContent |
407 | 407 | */ |
408 | - public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType) |
|
408 | + public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType) |
|
409 | 409 | { |
410 | 410 | $result = $BagValue->results; |
411 | 411 | |
412 | 412 | $propertyContent = new ODataPropertyContent(); |
413 | 413 | $odataProperty = new ODataProperty(); |
414 | 414 | $odataProperty->name = $propertyName; |
415 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
415 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
416 | 416 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
417 | 417 | |
418 | 418 | $propertyContent->properties[] = $odataProperty; |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | * primitive property to be written |
429 | 429 | * @return ODataPropertyContent |
430 | 430 | */ |
431 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
431 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
432 | 432 | { |
433 | 433 | assert(null != $resourceProperty, 'Resource property must not be null'); |
434 | 434 | $propertyContent = new ODataPropertyContent(); |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $segmentWrappers = $this->getStack()->getSegmentWrappers(); |
678 | 678 | $count = count($segmentWrappers); |
679 | 679 | |
680 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1]; |
|
680 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; |
|
681 | 681 | } |
682 | 682 | |
683 | 683 | /** |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
703 | 703 | assert(!is_null($skipToken), '!is_null($skipToken)'); |
704 | 704 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
705 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
705 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
706 | 706 | |
707 | 707 | return $skipToken; |
708 | 708 | } |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | |
737 | 737 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
738 | 738 | if (!is_null($topCountValue)) { |
739 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
739 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
740 | 740 | if (0 < $remainingCount) { |
741 | 741 | if (!is_null($queryParameterString)) { |
742 | 742 | $queryParameterString .= '&'; |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | * |
772 | 772 | * @return string |
773 | 773 | */ |
774 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
774 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
775 | 775 | { |
776 | 776 | if ($type instanceof Boolean) { |
777 | 777 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | * @param $result |
870 | 870 | * @return ODataBagContent|null |
871 | 871 | */ |
872 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
872 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
873 | 873 | { |
874 | 874 | assert(null == $result || is_array($result), 'Bag parameter must be null or array'); |
875 | 875 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | * @param string|null $propertyName |
903 | 903 | * @return ODataPropertyContent |
904 | 904 | */ |
905 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
905 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
906 | 906 | { |
907 | 907 | assert(is_object($result), 'Supplied $customObject must be an object'); |
908 | 908 |