@@ -621,10 +621,10 @@ |
||
| 621 | 621 | { |
| 622 | 622 | $queryParameterString = null; |
| 623 | 623 | foreach ([ODataConstants::HTTPQUERY_STRING_FILTER, |
| 624 | - ODataConstants::HTTPQUERY_STRING_EXPAND, |
|
| 625 | - ODataConstants::HTTPQUERY_STRING_ORDERBY, |
|
| 626 | - ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
|
| 627 | - ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
| 624 | + ODataConstants::HTTPQUERY_STRING_EXPAND, |
|
| 625 | + ODataConstants::HTTPQUERY_STRING_ORDERBY, |
|
| 626 | + ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
|
| 627 | + ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
| 628 | 628 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
| 629 | 629 | if (!is_null($value)) { |
| 630 | 630 | if (!is_null($queryParameterString)) { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $this->service = $service; |
| 95 | 95 | $this->request = $request; |
| 96 | 96 | $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString(); |
| 97 | - $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/'; |
|
| 97 | + $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/'; |
|
| 98 | 98 | $this->stack = new SegmentStack($request); |
| 99 | 99 | $this->complexTypeInstanceCollection = []; |
| 100 | 100 | $this->modelSerialiser = new ModelSerialiser(); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $resourceType, |
| 141 | 141 | $resourceSet->getName() |
| 142 | 142 | ); |
| 143 | - $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri; |
|
| 143 | + $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri; |
|
| 144 | 144 | |
| 145 | 145 | list($mediaLink, $mediaLinks) = $this->writeMediaData($entryObject, $type, $relativeUri, $resourceType); |
| 146 | 146 | |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | $propType = 'application/atom+xml;type='.$propTail; |
| 162 | 162 | $propName = $prop->getName(); |
| 163 | 163 | $nuLink->title = $propName; |
| 164 | - $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
|
| 165 | - $nuLink->url = $relativeUri . '/' . $propName; |
|
| 164 | + $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propName; |
|
| 165 | + $nuLink->url = $relativeUri.'/'.$propName; |
|
| 166 | 166 | $nuLink->type = $propType; |
| 167 | 167 | |
| 168 | 168 | $navProp = new ODataNavigationPropertyInfo($prop, $this->shouldExpandSegment($propName)); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $segment = $this->getNextLinkUri($lastObject, $absoluteUri); |
| 234 | 234 | $nextLink = new ODataLink(); |
| 235 | 235 | $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING; |
| 236 | - $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment; |
|
| 236 | + $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment; |
|
| 237 | 237 | $odata->nextPageLink = $nextLink; |
| 238 | 238 | } |
| 239 | 239 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $this->getCurrentResourceSetWrapper()->getName() |
| 259 | 259 | ); |
| 260 | 260 | |
| 261 | - $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri; |
|
| 261 | + $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri; |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | return $url; |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $segment = $this->getNextLinkUri($lastObject, $this->getRequest()->getRequestUrl()->getUrlAsString()); |
| 289 | 289 | $nextLink = new ODataLink(); |
| 290 | 290 | $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING; |
| 291 | - $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment; |
|
| 291 | + $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment; |
|
| 292 | 292 | $urls->nextPageLink = $nextLink; |
| 293 | 293 | } |
| 294 | 294 | } |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | * @return ODataPropertyContent |
| 314 | 314 | * @codeCoverageIgnore |
| 315 | 315 | */ |
| 316 | - public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType &$resourceType) |
|
| 316 | + public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType & $resourceType) |
|
| 317 | 317 | { |
| 318 | 318 | // TODO: Figure out if we need to bother implementing this |
| 319 | 319 | } |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | * @codeCoverageIgnore |
| 331 | 331 | * @return ODataPropertyContent |
| 332 | 332 | */ |
| 333 | - public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType &$resourceType) |
|
| 333 | + public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType & $resourceType) |
|
| 334 | 334 | { |
| 335 | 335 | // TODO: Figure out if we need to bother implementing this |
| 336 | 336 | } |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | * @codeCoverageIgnore |
| 348 | 348 | * @return ODataPropertyContent |
| 349 | 349 | */ |
| 350 | - public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
| 350 | + public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty & $resourceProperty = null) |
|
| 351 | 351 | { |
| 352 | 352 | // TODO: Figure out if we need to bother implementing this |
| 353 | 353 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $typeName = $resourceType->getName(); |
| 401 | 401 | $keyProperties = $resourceType->getKeyProperties(); |
| 402 | 402 | assert(count($keyProperties) != 0, 'count($keyProperties) == 0'); |
| 403 | - $keyString = $containerName . '('; |
|
| 403 | + $keyString = $containerName.'('; |
|
| 404 | 404 | $comma = null; |
| 405 | 405 | foreach ($keyProperties as $keyName => $resourceProperty) { |
| 406 | 406 | $keyType = $resourceProperty->getInstanceType(); |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | $keyValue = $keyType->convertToOData($keyValue); |
| 417 | - $keyString .= $comma . $keyName . '=' . $keyValue; |
|
| 417 | + $keyString .= $comma.$keyName.'='.$keyValue; |
|
| 418 | 418 | $comma = ','; |
| 419 | 419 | } |
| 420 | 420 | |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | $mediaLink = null; |
| 440 | 440 | if ($resourceType->isMediaLinkEntry()) { |
| 441 | 441 | $eTag = $streamProviderWrapper->getStreamETag2($entryObject, null, $context); |
| 442 | - $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri . '/$value', '*/*', $eTag); |
|
| 442 | + $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri.'/$value', '*/*', $eTag); |
|
| 443 | 443 | } |
| 444 | 444 | $mediaLinks = []; |
| 445 | 445 | if ($resourceType->hasNamedStream()) { |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | $segmentWrappers = $this->getStack()->getSegmentWrappers(); |
| 581 | 581 | $count = count($segmentWrappers); |
| 582 | 582 | |
| 583 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1]; |
|
| 583 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; |
|
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | /** |
@@ -628,21 +628,21 @@ discard block |
||
| 628 | 628 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
| 629 | 629 | if (!is_null($value)) { |
| 630 | 630 | if (!is_null($queryParameterString)) { |
| 631 | - $queryParameterString = $queryParameterString . '&'; |
|
| 631 | + $queryParameterString = $queryParameterString.'&'; |
|
| 632 | 632 | } |
| 633 | 633 | |
| 634 | - $queryParameterString .= $queryOption . '=' . $value; |
|
| 634 | + $queryParameterString .= $queryOption.'='.$value; |
|
| 635 | 635 | } |
| 636 | 636 | } |
| 637 | 637 | |
| 638 | 638 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
| 639 | 639 | if (!is_null($topCountValue)) { |
| 640 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
| 640 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
| 641 | 641 | if (!is_null($queryParameterString)) { |
| 642 | 642 | $queryParameterString .= '&'; |
| 643 | 643 | } |
| 644 | 644 | |
| 645 | - $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP . '=' . $remainingCount; |
|
| 645 | + $queryParameterString .= ODataConstants::HTTPQUERY_STRING_TOP.'='.$remainingCount; |
|
| 646 | 646 | } |
| 647 | 647 | |
| 648 | 648 | if (!is_null($queryParameterString)) { |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | * |
| 671 | 671 | * @return string |
| 672 | 672 | */ |
| 673 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
| 673 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
| 674 | 674 | { |
| 675 | 675 | if ($type instanceof Boolean) { |
| 676 | 676 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | $nuLink->expandedResult->selfLink->title = $propName; |
| 741 | 741 | $nuLink->expandedResult->selfLink->url = $nuLink->url; |
| 742 | 742 | $nuLink->expandedResult->title = $propName; |
| 743 | - $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url; |
|
| 743 | + $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url; |
|
| 744 | 744 | } |
| 745 | 745 | } |
| 746 | 746 | } |
@@ -754,6 +754,6 @@ discard block |
||
| 754 | 754 | { |
| 755 | 755 | $this->service = $service; |
| 756 | 756 | $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString(); |
| 757 | - $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/'; |
|
| 757 | + $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/'; |
|
| 758 | 758 | } |
| 759 | 759 | } |