@@ -395,6 +395,9 @@ discard block |
||
| 395 | 395 | return $this->stack; |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | + /** |
|
| 399 | + * @param string $containerName |
|
| 400 | + */ |
|
| 398 | 401 | protected function getEntryInstanceKey($entityInstance, ResourceType $resourceType, $containerName) |
| 399 | 402 | { |
| 400 | 403 | $typeName = $resourceType->getName(); |
@@ -426,7 +429,7 @@ discard block |
||
| 426 | 429 | /** |
| 427 | 430 | * @param $entryObject |
| 428 | 431 | * @param $type |
| 429 | - * @param $relativeUri |
|
| 432 | + * @param string $relativeUri |
|
| 430 | 433 | * @param $resourceType |
| 431 | 434 | * @return array |
| 432 | 435 | */ |
@@ -493,7 +496,7 @@ discard block |
||
| 493 | 496 | * Find a 'ExpandedProjectionNode' instance in the projection tree |
| 494 | 497 | * which describes the current segment. |
| 495 | 498 | * |
| 496 | - * @return ExpandedProjectionNode|null |
|
| 499 | + * @return null|\POData\UriProcessor\QueryProcessor\ExpandProjectionParser\RootProjectionNode|ExpandedProjectionNode |
|
| 497 | 500 | */ |
| 498 | 501 | protected function getCurrentExpandedProjectionNode() |
| 499 | 502 | { |
@@ -664,7 +667,7 @@ discard block |
||
| 664 | 667 | /** |
| 665 | 668 | * @param $entryObject |
| 666 | 669 | * @param $prop |
| 667 | - * @param $nuLink |
|
| 670 | + * @param ODataLink $nuLink |
|
| 668 | 671 | * @param $propKind |
| 669 | 672 | * @param $propName |
| 670 | 673 | */ |
@@ -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 | /** |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | * |
| 621 | 621 | * @return string |
| 622 | 622 | */ |
| 623 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
| 623 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
| 624 | 624 | { |
| 625 | 625 | if ($type instanceof Boolean) { |
| 626 | 626 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | $nuLink->expandedResult->selfLink->title = $propName; |
| 691 | 691 | $nuLink->expandedResult->selfLink->url = $nuLink->url; |
| 692 | 692 | $nuLink->expandedResult->title = $propName; |
| 693 | - $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url; |
|
| 693 | + $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url; |
|
| 694 | 694 | } |
| 695 | 695 | } |
| 696 | 696 | } |