@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->service = $service; |
98 | 98 | $this->request = $request; |
99 | 99 | $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString(); |
100 | - $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/'; |
|
100 | + $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/'; |
|
101 | 101 | $this->stack = new SegmentStack($request); |
102 | 102 | $this->complexTypeInstanceCollection = []; |
103 | 103 | $this->modelSerialiser = new ModelSerialiser(); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $resourceType, |
144 | 144 | $resourceSet->getName() |
145 | 145 | ); |
146 | - $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri; |
|
146 | + $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri; |
|
147 | 147 | |
148 | 148 | list($mediaLink, $mediaLinks) = $this->writeMediaData($entryObject->results, $type, $relativeUri, $resourceType); |
149 | 149 | |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | $propType = 'application/atom+xml;type='.$propTail; |
165 | 165 | $propName = $prop->getName(); |
166 | 166 | $nuLink->title = $propName; |
167 | - $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
|
168 | - $nuLink->url = $relativeUri . '/' . $propName; |
|
167 | + $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propName; |
|
168 | + $nuLink->url = $relativeUri.'/'.$propName; |
|
169 | 169 | $nuLink->type = $propType; |
170 | 170 | |
171 | 171 | $navProp = new ODataNavigationPropertyInfo($prop, $this->shouldExpandSegment($propName)); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | * |
202 | 202 | * @return ODataFeed |
203 | 203 | */ |
204 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
204 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
205 | 205 | { |
206 | 206 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
207 | 207 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | $resourceSet = $this->getRequest()->getTargetResourceSetWrapper()->getResourceSet(); |
239 | 239 | $requestTop = $this->getRequest()->getTopOptionCount(); |
240 | 240 | $pageSize = $this->getService()->getConfiguration()->getEntitySetPageSize($resourceSet); |
241 | - $requestTop = (null == $requestTop) ? $pageSize + 1 : $requestTop; |
|
241 | + $requestTop = (null == $requestTop) ? $pageSize+1 : $requestTop; |
|
242 | 242 | |
243 | 243 | if (true === $entryObjects->hasMore && $requestTop > $pageSize) { |
244 | 244 | $stackSegment = $setName; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $segment = $this->getNextLinkUri($lastObject, $absoluteUri); |
247 | 247 | $nextLink = new ODataLink(); |
248 | 248 | $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING; |
249 | - $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment; |
|
249 | + $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment; |
|
250 | 250 | $odata->nextPageLink = $nextLink; |
251 | 251 | } |
252 | 252 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $this->getCurrentResourceSetWrapper()->getName() |
272 | 272 | ); |
273 | 273 | |
274 | - $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri; |
|
274 | + $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | return $url; |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $segment = $this->getNextLinkUri($lastObject, $this->getRequest()->getRequestUrl()->getUrlAsString()); |
302 | 302 | $nextLink = new ODataLink(); |
303 | 303 | $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING; |
304 | - $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment; |
|
304 | + $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment; |
|
305 | 305 | $urls->nextPageLink = $nextLink; |
306 | 306 | } |
307 | 307 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | * |
326 | 326 | * @return ODataPropertyContent |
327 | 327 | */ |
328 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
328 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
329 | 329 | { |
330 | 330 | $result = $complexValue->results; |
331 | 331 | |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | * bag object |
370 | 370 | * @return ODataPropertyContent |
371 | 371 | */ |
372 | - public function writeTopLevelBagObject(QueryResult &$BagValue, $propertyName, ResourceType &$resourceType) |
|
372 | + public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType) |
|
373 | 373 | { |
374 | 374 | $result = $BagValue->results; |
375 | 375 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | * to be written |
404 | 404 | * @return ODataPropertyContent |
405 | 405 | */ |
406 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
406 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
407 | 407 | { |
408 | 408 | assert(null != $resourceProperty, "Resource property must not be null"); |
409 | 409 | $propertyContent = new ODataPropertyContent(); |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | $typeName = $resourceType->getName(); |
472 | 472 | $keyProperties = $resourceType->getKeyProperties(); |
473 | 473 | assert(count($keyProperties) != 0, 'count($keyProperties) == 0'); |
474 | - $keyString = $containerName . '('; |
|
474 | + $keyString = $containerName.'('; |
|
475 | 475 | $comma = null; |
476 | 476 | foreach ($keyProperties as $keyName => $resourceProperty) { |
477 | 477 | $keyType = $resourceProperty->getInstanceType(); |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | } |
486 | 486 | |
487 | 487 | $keyValue = $keyType->convertToOData($keyValue); |
488 | - $keyString .= $comma . $keyName . '=' . $keyValue; |
|
488 | + $keyString .= $comma.$keyName.'='.$keyValue; |
|
489 | 489 | $comma = ','; |
490 | 490 | } |
491 | 491 | |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | $mediaLink = null; |
511 | 511 | if ($resourceType->isMediaLinkEntry()) { |
512 | 512 | $eTag = $streamProviderWrapper->getStreamETag2($entryObject, null, $context); |
513 | - $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri . '/$value', '*/*', $eTag); |
|
513 | + $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri.'/$value', '*/*', $eTag); |
|
514 | 514 | } |
515 | 515 | $mediaLinks = []; |
516 | 516 | if ($resourceType->hasNamedStream()) { |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | $segmentWrappers = $this->getStack()->getSegmentWrappers(); |
652 | 652 | $count = count($segmentWrappers); |
653 | 653 | |
654 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1]; |
|
654 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; |
|
655 | 655 | } |
656 | 656 | |
657 | 657 | /** |
@@ -701,22 +701,22 @@ discard block |
||
701 | 701 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
702 | 702 | if (!is_null($value)) { |
703 | 703 | if (!is_null($queryParameterString)) { |
704 | - $queryParameterString = $queryParameterString . '&'; |
|
704 | + $queryParameterString = $queryParameterString.'&'; |
|
705 | 705 | } |
706 | 706 | |
707 | - $queryParameterString .= $queryOption . '=' . $value; |
|
707 | + $queryParameterString .= $queryOption.'='.$value; |
|
708 | 708 | } |
709 | 709 | } |
710 | 710 | |
711 | 711 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
712 | 712 | if (!is_null($topCountValue)) { |
713 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
713 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
714 | 714 | if (0 < $remainingCount) { |
715 | 715 | if (!is_null($queryParameterString)) { |
716 | 716 | $queryParameterString .= '&'; |
717 | 717 | } |
718 | 718 | |
719 | - $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP . '=' . $remainingCount; |
|
719 | + $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP.'='.$remainingCount; |
|
720 | 720 | } |
721 | 721 | } |
722 | 722 | |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | * |
746 | 746 | * @return string |
747 | 747 | */ |
748 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
748 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
749 | 749 | { |
750 | 750 | if ($type instanceof Boolean) { |
751 | 751 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | $nuLink->expandedResult->selfLink->title = $propName; |
818 | 818 | $nuLink->expandedResult->selfLink->url = $nuLink->url; |
819 | 819 | $nuLink->expandedResult->title = $propName; |
820 | - $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url; |
|
820 | + $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url; |
|
821 | 821 | } |
822 | 822 | } |
823 | 823 | } |
@@ -831,6 +831,6 @@ discard block |
||
831 | 831 | { |
832 | 832 | $this->service = $service; |
833 | 833 | $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString(); |
834 | - $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/'; |
|
834 | + $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/'; |
|
835 | 835 | } |
836 | 836 | } |