@@ -362,6 +362,9 @@ discard block |
||
| 362 | 362 | return $this->stack; |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | + /** |
|
| 366 | + * @param string $containerName |
|
| 367 | + */ |
|
| 365 | 368 | protected function getEntryInstanceKey($entityInstance, ResourceType $resourceType, $containerName) |
| 366 | 369 | { |
| 367 | 370 | $typeName = $resourceType->getName(); |
@@ -394,7 +397,7 @@ discard block |
||
| 394 | 397 | /** |
| 395 | 398 | * @param $entryObject |
| 396 | 399 | * @param $type |
| 397 | - * @param $relativeUri |
|
| 400 | + * @param string $relativeUri |
|
| 398 | 401 | * @param $resourceType |
| 399 | 402 | * @return array |
| 400 | 403 | */ |
@@ -461,7 +464,7 @@ discard block |
||
| 461 | 464 | * Find a 'ExpandedProjectionNode' instance in the projection tree |
| 462 | 465 | * which describes the current segment. |
| 463 | 466 | * |
| 464 | - * @return ExpandedProjectionNode|null |
|
| 467 | + * @return null|\POData\UriProcessor\QueryProcessor\ExpandProjectionParser\RootProjectionNode|ExpandedProjectionNode |
|
| 465 | 468 | */ |
| 466 | 469 | protected function getCurrentExpandedProjectionNode() |
| 467 | 470 | { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $this->service = $service; |
| 88 | 88 | $this->request = $request; |
| 89 | 89 | $this->absoluteServiceUri = $service->getHost()->getAbsoluteServiceUri()->getUrlAsString(); |
| 90 | - $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/') . '/'; |
|
| 90 | + $this->absoluteServiceUriWithSlash = rtrim($this->absoluteServiceUri, '/').'/'; |
|
| 91 | 91 | $this->stack = new SegmentStack($request); |
| 92 | 92 | $this->complexTypeInstanceCollection = []; |
| 93 | 93 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $resourceType, |
| 133 | 133 | $resourceSet->getName() |
| 134 | 134 | ); |
| 135 | - $absoluteUri = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri; |
|
| 135 | + $absoluteUri = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri; |
|
| 136 | 136 | |
| 137 | 137 | list($mediaLink, $mediaLinks) = $this->writeMediaData($entryObject, $type, $relativeUri, $resourceType); |
| 138 | 138 | |
@@ -153,8 +153,8 @@ discard block |
||
| 153 | 153 | $propType = 'application/atom+xml;type='.$propTail; |
| 154 | 154 | $propName = $prop->getName(); |
| 155 | 155 | $nuLink->title = $propName; |
| 156 | - $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
|
| 157 | - $nuLink->url = $relativeUri . '/' . $propName; |
|
| 156 | + $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE.$propName; |
|
| 157 | + $nuLink->url = $relativeUri.'/'.$propName; |
|
| 158 | 158 | $nuLink->type = $propType; |
| 159 | 159 | |
| 160 | 160 | $navProp = new ODataNavigationPropertyInfo($prop, $this->shouldExpandSegment($propName)); |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $nuLink->expandedResult->selfLink->title = $propName; |
| 180 | 180 | $nuLink->expandedResult->selfLink->url = $nuLink->url; |
| 181 | 181 | $nuLink->expandedResult->title = $propName; |
| 182 | - $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/') . '/' . $nuLink->url; |
|
| 182 | + $nuLink->expandedResult->id = rtrim($this->absoluteServiceUri, '/').'/'.$nuLink->url; |
|
| 183 | 183 | } |
| 184 | 184 | } |
| 185 | 185 | } |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $segment = $this->getNextLinkUri($lastObject, $absoluteUri); |
| 252 | 252 | $nextLink = new ODataLink(); |
| 253 | 253 | $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING; |
| 254 | - $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment; |
|
| 254 | + $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment; |
|
| 255 | 255 | $odata->nextPageLink = $nextLink; |
| 256 | 256 | } |
| 257 | 257 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $this->getCurrentResourceSetWrapper()->getName() |
| 277 | 277 | ); |
| 278 | 278 | |
| 279 | - $url->url = rtrim($this->absoluteServiceUri, '/') . '/' . $relativeUri; |
|
| 279 | + $url->url = rtrim($this->absoluteServiceUri, '/').'/'.$relativeUri; |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | return $url; |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $segment = $this->getNextLinkUri($lastObject, $this->getRequest()->getRequestUrl()->getUrlAsString()); |
| 307 | 307 | $nextLink = new ODataLink(); |
| 308 | 308 | $nextLink->name = ODataConstants::ATOM_LINK_NEXT_ATTRIBUTE_STRING; |
| 309 | - $nextLink->url = rtrim($this->absoluteServiceUri, '/') . '/' . $stackSegment . $segment; |
|
| 309 | + $nextLink->url = rtrim($this->absoluteServiceUri, '/').'/'.$stackSegment.$segment; |
|
| 310 | 310 | $urls->nextPageLink = $nextLink; |
| 311 | 311 | } |
| 312 | 312 | } |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | * @return ODataPropertyContent |
| 332 | 332 | * @codeCoverageIgnore |
| 333 | 333 | */ |
| 334 | - public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType &$resourceType) |
|
| 334 | + public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType & $resourceType) |
|
| 335 | 335 | { |
| 336 | 336 | // TODO: Figure out if we need to bother implementing this |
| 337 | 337 | } |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | * @codeCoverageIgnore |
| 349 | 349 | * @return ODataPropertyContent |
| 350 | 350 | */ |
| 351 | - public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType &$resourceType) |
|
| 351 | + public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType & $resourceType) |
|
| 352 | 352 | { |
| 353 | 353 | // TODO: Figure out if we need to bother implementing this |
| 354 | 354 | } |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | * @codeCoverageIgnore |
| 366 | 366 | * @return ODataPropertyContent |
| 367 | 367 | */ |
| 368 | - public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
| 368 | + public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty & $resourceProperty = null) |
|
| 369 | 369 | { |
| 370 | 370 | // TODO: Figure out if we need to bother implementing this |
| 371 | 371 | } |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | $typeName = $resourceType->getName(); |
| 419 | 419 | $keyProperties = $resourceType->getKeyProperties(); |
| 420 | 420 | assert(count($keyProperties) != 0, 'count($keyProperties) == 0'); |
| 421 | - $keyString = $containerName . '('; |
|
| 421 | + $keyString = $containerName.'('; |
|
| 422 | 422 | $comma = null; |
| 423 | 423 | foreach ($keyProperties as $keyName => $resourceProperty) { |
| 424 | 424 | $keyType = $resourceProperty->getInstanceType(); |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | $keyValue = $keyType->convertToOData($keyValue); |
| 435 | - $keyString .= $comma . $keyName . '=' . $keyValue; |
|
| 435 | + $keyString .= $comma.$keyName.'='.$keyValue; |
|
| 436 | 436 | $comma = ','; |
| 437 | 437 | } |
| 438 | 438 | |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | $mediaLink = null; |
| 458 | 458 | if ($resourceType->isMediaLinkEntry()) { |
| 459 | 459 | $eTag = $streamProviderWrapper->getStreamETag2($entryObject, null, $context); |
| 460 | - $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri . '/$value', '*/*', $eTag); |
|
| 460 | + $mediaLink = new ODataMediaLink($type, '/$value', $relativeUri.'/$value', '*/*', $eTag); |
|
| 461 | 461 | } |
| 462 | 462 | $mediaLinks = []; |
| 463 | 463 | if ($resourceType->hasNamedStream()) { |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | $segmentWrappers = $this->getStack()->getSegmentWrappers(); |
| 600 | 600 | $count = count($segmentWrappers); |
| 601 | 601 | |
| 602 | - return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count - 1]; |
|
| 602 | + return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; |
|
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | /** |