@@ -318,11 +318,11 @@ discard block |
||
| 318 | 318 | $registry->register(new JsonODataV1Writer()); |
| 319 | 319 | $registry->register(new AtomODataWriter($serviceURI)); |
| 320 | 320 | |
| 321 | - if($serviceVersion->compare(Version::v2()) > -1){ |
|
| 321 | + if ($serviceVersion->compare(Version::v2()) > -1) { |
|
| 322 | 322 | $registry->register(new JsonODataV2Writer()); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - if($serviceVersion->compare(Version::v3()) > -1){ |
|
| 325 | + if ($serviceVersion->compare(Version::v3()) > -1) { |
|
| 326 | 326 | $registry->register(new JsonLightODataWriter(JsonLightMetadataLevel::NONE(), $serviceURI)); |
| 327 | 327 | $registry->register(new JsonLightODataWriter(JsonLightMetadataLevel::MINIMAL(), $serviceURI)); |
| 328 | 328 | $registry->register(new JsonLightODataWriter(JsonLightMetadataLevel::FULL(), $serviceURI)); |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | |
| 354 | 354 | if (is_null($responseContentType) && $request->getTargetKind() != TargetKind::MEDIA_RESOURCE()) { |
| 355 | 355 | //the responseContentType can ONLY be null if it's a stream (media resource) and that stream is storing null as the content type |
| 356 | - throw new ODataException( Messages::unsupportedMediaType(), 415 ); |
|
| 356 | + throw new ODataException(Messages::unsupportedMediaType(), 415); |
|
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | $odataModelInstance = null; |
@@ -530,10 +530,10 @@ discard block |
||
| 530 | 530 | |
| 531 | 531 | //if the $format header is present it overrides the accepts header |
| 532 | 532 | $format = $host->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_FORMAT); |
| 533 | - if(!is_null($format)){ |
|
| 533 | + if (!is_null($format)) { |
|
| 534 | 534 | |
| 535 | 535 | //There's a strange edge case..if application/json is supplied and it's V3 |
| 536 | - if($format == MimeTypes::MIME_APPLICATION_JSON && $requestVersion == Version::v3()){ |
|
| 536 | + if ($format == MimeTypes::MIME_APPLICATION_JSON && $requestVersion == Version::v3()) { |
|
| 537 | 537 | //then it's actual minimalmetadata |
| 538 | 538 | //TODO: should this be done with the header text too? |
| 539 | 539 | $format = MimeTypes::MIME_APPLICATION_JSON_MINIMAL_META; |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | //getTargetKind doesn't deal with link resources directly and this can change things |
| 550 | 550 | $targetKind = $request->isLinkUri() ? TargetKind::LINK() : $request->getTargetKind(); |
| 551 | 551 | |
| 552 | - switch($targetKind){ |
|
| 552 | + switch ($targetKind) { |
|
| 553 | 553 | case TargetKind::METADATA(): |
| 554 | 554 | return HttpProcessUtility::selectMimeType( |
| 555 | 555 | $requestAcceptText, |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | ); |
| 628 | 628 | |
| 629 | 629 | case TargetKind::MEDIA_RESOURCE(): |
| 630 | - if (!$request->isNamedStream() && !$request->getTargetResourceType()->isMediaLinkEntry()){ |
|
| 630 | + if (!$request->isNamedStream() && !$request->getTargetResourceType()->isMediaLinkEntry()) { |
|
| 631 | 631 | throw ODataException::createBadRequestError( |
| 632 | 632 | Messages::badRequestInvalidUriForMediaResource( |
| 633 | 633 | $host->getAbsoluteRequestUri()->getUrlAsString() |
@@ -661,7 +661,7 @@ discard block |
||
| 661 | 661 | |
| 662 | 662 | |
| 663 | 663 | //If we got here, we just don't know what it is... |
| 664 | - throw new ODataException( Messages::unsupportedMediaType(), 415 ); |
|
| 664 | + throw new ODataException(Messages::unsupportedMediaType(), 415); |
|
| 665 | 665 | |
| 666 | 666 | } |
| 667 | 667 | |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | * @return string|null The ETag for the entry object if it has eTag properties |
| 683 | 683 | * NULL otherwise. |
| 684 | 684 | */ |
| 685 | - protected function compareETag(&$entryObject, ResourceType &$resourceType, |
|
| 685 | + protected function compareETag(&$entryObject, ResourceType & $resourceType, |
|
| 686 | 686 | &$needToSerializeResponse |
| 687 | 687 | ) { |
| 688 | 688 | $needToSerializeResponse = true; |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | * for use in a URI) there are etag properties, NULL if |
| 776 | 776 | * there is no etag property. |
| 777 | 777 | */ |
| 778 | - protected function getETagForEntry(&$entryObject, ResourceType &$resourceType) |
|
| 778 | + protected function getETagForEntry(&$entryObject, ResourceType & $resourceType) |
|
| 779 | 779 | { |
| 780 | 780 | $eTag = null; |
| 781 | 781 | $comma = null; |
@@ -790,16 +790,16 @@ discard block |
||
| 790 | 790 | try { |
| 791 | 791 | |
| 792 | 792 | //TODO #88...also this seems like dupe work |
| 793 | - $reflectionProperty = new \ReflectionProperty($entryObject, $eTagProperty->getName() ); |
|
| 793 | + $reflectionProperty = new \ReflectionProperty($entryObject, $eTagProperty->getName()); |
|
| 794 | 794 | $value = $reflectionProperty->getValue($entryObject); |
| 795 | 795 | } catch (\ReflectionException $reflectionException) { |
| 796 | 796 | throw ODataException::createInternalServerError( |
| 797 | - Messages::failedToAccessProperty($eTagProperty->getName(), $resourceType->getName() ) |
|
| 797 | + Messages::failedToAccessProperty($eTagProperty->getName(), $resourceType->getName()) |
|
| 798 | 798 | ); |
| 799 | 799 | } |
| 800 | 800 | |
| 801 | 801 | if (is_null($value)) { |
| 802 | - $eTag = $eTag . $comma. 'null'; |
|
| 802 | + $eTag = $eTag . $comma . 'null'; |
|
| 803 | 803 | } else { |
| 804 | 804 | $eTag = $eTag . $comma . $type->convertToOData($value); |
| 805 | 805 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @param RequestDescription $request Description of the request submitted by client. |
| 66 | 66 | * @param IService $service Reference to the service implementation. |
| 67 | 67 | */ |
| 68 | - private function __construct(RequestDescription $request, IService $service ) { |
|
| 68 | + private function __construct(RequestDescription $request, IService $service) { |
|
| 69 | 69 | $this->request = $request; |
| 70 | 70 | $this->service = $service; |
| 71 | 71 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * |
| 103 | 103 | * @throws ODataException |
| 104 | 104 | */ |
| 105 | - public static function process(RequestDescription $request, IService $service ) { |
|
| 105 | + public static function process(RequestDescription $request, IService $service) { |
|
| 106 | 106 | $queryProcessor = new QueryProcessor($request, $service); |
| 107 | 107 | if ($request->getTargetSource() == TargetSource::NONE) { |
| 108 | 108 | //A service directory, metadata or batch request |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | private function _processSkipAndTop() |
| 149 | 149 | { |
| 150 | 150 | $value = null; |
| 151 | - if ($this->_readSkipOrTopOption( ODataConstants::HTTPQUERY_STRING_SKIP, $value ) ) { |
|
| 151 | + if ($this->_readSkipOrTopOption(ODataConstants::HTTPQUERY_STRING_SKIP, $value)) { |
|
| 152 | 152 | $this->request->setSkipCount($value); |
| 153 | 153 | } |
| 154 | 154 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | ->getResourceSetPageSize(); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - if ($this->_readSkipOrTopOption(ODataConstants::HTTPQUERY_STRING_TOP, $value) ) { |
|
| 163 | + if ($this->_readSkipOrTopOption(ODataConstants::HTTPQUERY_STRING_TOP, $value)) { |
|
| 164 | 164 | $this->request->setTopOptionCount($value); |
| 165 | 165 | if ($isPagingRequired && $pageSize < $value) { |
| 166 | 166 | //If $top is greater than or equal to page size, |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | private function _processOrderBy() |
| 198 | 198 | { |
| 199 | - $orderBy = $this->service->getHost()->getQueryStringItem( ODataConstants::HTTPQUERY_STRING_ORDERBY ); |
|
| 199 | + $orderBy = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_ORDERBY); |
|
| 200 | 200 | |
| 201 | 201 | if (!is_null($orderBy)) { |
| 202 | 202 | $this->_checkSetQueryApplicable(); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | * RequestDescription::getTopCount will give non-null value. |
| 218 | 218 | * |
| 219 | 219 | */ |
| 220 | - if (!is_null($this->request->getSkipCount())|| !is_null($this->request->getTopCount())) { |
|
| 220 | + if (!is_null($this->request->getSkipCount()) || !is_null($this->request->getTopCount())) { |
|
| 221 | 221 | $orderBy = !is_null($orderBy) ? $orderBy . ', ' : null; |
| 222 | 222 | $keys = array_keys($targetResourceType->getKeyProperties()); |
| 223 | 223 | //assert(!empty($keys)) |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | private function _processFilter() |
| 262 | 262 | { |
| 263 | - $filter = $this->service->getHost()->getQueryStringItem( ODataConstants::HTTPQUERY_STRING_FILTER ); |
|
| 263 | + $filter = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_FILTER); |
|
| 264 | 264 | if (is_null($filter)) { |
| 265 | 265 | return; |
| 266 | 266 | } |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $kind = $this->request->getTargetKind(); |
| 269 | 269 | if (!($kind == TargetKind::RESOURCE() |
| 270 | 270 | || $kind == TargetKind::COMPLEX_OBJECT() |
| 271 | - || $this->request->queryType == QueryType::COUNT() ) |
|
| 271 | + || $this->request->queryType == QueryType::COUNT()) |
|
| 272 | 272 | ) { |
| 273 | 273 | throw ODataException::createBadRequestError( |
| 274 | 274 | Messages::queryProcessorQueryFilterOptionNotApplicable() |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $resourceType = $this->request->getTargetResourceType(); |
| 278 | 278 | $expressionProvider = $this->service->getProvidersWrapper()->getExpressionProvider(); |
| 279 | 279 | $filterInfo = ExpressionParser2::parseExpression2($filter, $resourceType, $expressionProvider); |
| 280 | - $this->request->setFilterInfo( $filterInfo ); |
|
| 280 | + $this->request->setFilterInfo($filterInfo); |
|
| 281 | 281 | |
| 282 | 282 | } |
| 283 | 283 | |
@@ -294,10 +294,10 @@ discard block |
||
| 294 | 294 | */ |
| 295 | 295 | private function _processCount() |
| 296 | 296 | { |
| 297 | - $inlineCount = $this->service->getHost()->getQueryStringItem( ODataConstants::HTTPQUERY_STRING_INLINECOUNT ); |
|
| 297 | + $inlineCount = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_INLINECOUNT); |
|
| 298 | 298 | |
| 299 | 299 | //If it's not specified, we're done |
| 300 | - if(is_null($inlineCount)) return; |
|
| 300 | + if (is_null($inlineCount)) return; |
|
| 301 | 301 | |
| 302 | 302 | //If the service doesn't allow count requests..then throw an exception |
| 303 | 303 | if (!$this->service->getConfiguration()->getAcceptCountRequests()) { |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | |
| 316 | 316 | //You can't specify $count & $inlinecount together |
| 317 | 317 | //TODO: ensure there's a test for this case see #55 |
| 318 | - if ($this->request->queryType == QueryType::COUNT() ) { |
|
| 318 | + if ($this->request->queryType == QueryType::COUNT()) { |
|
| 319 | 319 | throw ODataException::createBadRequestError( |
| 320 | 320 | Messages::queryProcessorInlineCountWithValueCount() |
| 321 | 321 | ); |
@@ -327,8 +327,8 @@ discard block |
||
| 327 | 327 | if ($inlineCount === ODataConstants::URI_ROWCOUNT_ALLOPTION) { |
| 328 | 328 | $this->request->queryType = QueryType::ENTITIES_WITH_COUNT(); |
| 329 | 329 | |
| 330 | - $this->request->raiseMinVersionRequirement( 2, 0 ); |
|
| 331 | - $this->request->raiseResponseVersion( 2, 0 ); |
|
| 330 | + $this->request->raiseMinVersionRequirement(2, 0); |
|
| 331 | + $this->request->raiseResponseVersion(2, 0); |
|
| 332 | 332 | |
| 333 | 333 | } else { |
| 334 | 334 | throw ODataException::createBadRequestError( |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | */ |
| 356 | 356 | private function _processSkipToken() |
| 357 | 357 | { |
| 358 | - $skipToken = $this->service->getHost()->getQueryStringItem( ODataConstants::HTTPQUERY_STRING_SKIPTOKEN ); |
|
| 358 | + $skipToken = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_SKIPTOKEN); |
|
| 359 | 359 | if (is_null($skipToken)) { |
| 360 | 360 | return; |
| 361 | 361 | } |
@@ -383,8 +383,8 @@ discard block |
||
| 383 | 383 | $skipToken |
| 384 | 384 | ); |
| 385 | 385 | $this->request->setInternalSkipTokenInfo($internalSkipTokenInfo); |
| 386 | - $this->request->raiseMinVersionRequirement( 2, 0 ); |
|
| 387 | - $this->request->raiseResponseVersion( 2, 0 ); |
|
| 386 | + $this->request->raiseMinVersionRequirement(2, 0); |
|
| 387 | + $this->request->raiseResponseVersion(2, 0); |
|
| 388 | 388 | |
| 389 | 389 | |
| 390 | 390 | } |
@@ -402,26 +402,26 @@ discard block |
||
| 402 | 402 | */ |
| 403 | 403 | private function _processExpandAndSelect() |
| 404 | 404 | { |
| 405 | - $expand = $this->service->getHost()->getQueryStringItem( ODataConstants::HTTPQUERY_STRING_EXPAND ); |
|
| 405 | + $expand = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_EXPAND); |
|
| 406 | 406 | |
| 407 | 407 | if (!is_null($expand)) { |
| 408 | - $this->_checkExpandOrSelectApplicable(ODataConstants::HTTPQUERY_STRING_EXPAND ); |
|
| 408 | + $this->_checkExpandOrSelectApplicable(ODataConstants::HTTPQUERY_STRING_EXPAND); |
|
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - $select = $this->service->getHost()->getQueryStringItem( ODataConstants::HTTPQUERY_STRING_SELECT ); |
|
| 411 | + $select = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_SELECT); |
|
| 412 | 412 | |
| 413 | 413 | if (!is_null($select)) { |
| 414 | 414 | if (!$this->service->getConfiguration()->getAcceptProjectionRequests()) { |
| 415 | - throw ODataException::createBadRequestError( Messages::configurationProjectionsNotAccepted() ); |
|
| 415 | + throw ODataException::createBadRequestError(Messages::configurationProjectionsNotAccepted()); |
|
| 416 | 416 | } |
| 417 | 417 | |
| 418 | - $this->_checkExpandOrSelectApplicable( ODataConstants::HTTPQUERY_STRING_SELECT ); |
|
| 418 | + $this->_checkExpandOrSelectApplicable(ODataConstants::HTTPQUERY_STRING_SELECT); |
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | // We will generate RootProjectionNode in case of $link request also, but |
| 422 | 422 | // expand and select in this case must be null (we are ensuring this above) |
| 423 | 423 | // 'RootProjectionNode' is required while generating next page Link |
| 424 | - if ($this->_expandSelectApplicable || $this->request->isLinkUri() ) { |
|
| 424 | + if ($this->_expandSelectApplicable || $this->request->isLinkUri()) { |
|
| 425 | 425 | |
| 426 | 426 | $rootProjectionNode = ExpandProjectionParser::parseExpandAndSelectClause( |
| 427 | 427 | $this->request->getTargetResourceSetWrapper(), |
@@ -434,13 +434,13 @@ discard block |
||
| 434 | 434 | $this->service->getProvidersWrapper() |
| 435 | 435 | ); |
| 436 | 436 | if ($rootProjectionNode->isSelectionSpecified()) { |
| 437 | - $this->request->raiseMinVersionRequirement(2, 0 ); |
|
| 437 | + $this->request->raiseMinVersionRequirement(2, 0); |
|
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | if ($rootProjectionNode->hasPagedExpandedResult()) { |
| 441 | - $this->request->raiseResponseVersion( 2, 0 ); |
|
| 441 | + $this->request->raiseResponseVersion(2, 0); |
|
| 442 | 442 | } |
| 443 | - $this->request->setRootProjectionNode($rootProjectionNode ); |
|
| 443 | + $this->request->setRootProjectionNode($rootProjectionNode); |
|
| 444 | 444 | |
| 445 | 445 | } |
| 446 | 446 | } |
@@ -269,8 +269,8 @@ discard block |
||
| 269 | 269 | $this->requestMaxVersion = is_null($maxRequestVersion) ? $this->requestVersion : self::parseVersionHeader($maxRequestVersion, ODataConstants::ODATAMAXVERSIONHEADER); |
| 270 | 270 | |
| 271 | 271 | //if it's OData v3..things change a bit |
| 272 | - if($this->maxServiceVersion == Version::v3()){ |
|
| 273 | - if(is_null($maxRequestVersion)) |
|
| 272 | + if ($this->maxServiceVersion == Version::v3()) { |
|
| 273 | + if (is_null($maxRequestVersion)) |
|
| 274 | 274 | { |
| 275 | 275 | //if max request version isn't specified we use the service max version instead of the request version |
| 276 | 276 | //thus we favour newer versions |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | * @throws ODataException If capability negotiation fails. |
| 403 | 403 | */ |
| 404 | 404 | public function raiseMinVersionRequirement($major, $minor) { |
| 405 | - if($this->requiredMinRequestVersion->raiseVersion($major, $minor)) |
|
| 405 | + if ($this->requiredMinRequestVersion->raiseVersion($major, $minor)) |
|
| 406 | 406 | { |
| 407 | 407 | $this->validateVersions(); |
| 408 | 408 | } |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | * @throws ODataException If capability negotiation fails. |
| 419 | 419 | */ |
| 420 | 420 | public function raiseResponseVersion($major, $minor) { |
| 421 | - if($this->requiredMinResponseVersion->raiseVersion($major, $minor)){ |
|
| 421 | + if ($this->requiredMinResponseVersion->raiseVersion($major, $minor)) { |
|
| 422 | 422 | $this->validateVersions(); |
| 423 | 423 | } |
| 424 | 424 | |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | * |
| 753 | 753 | * @return void |
| 754 | 754 | */ |
| 755 | - public function setInternalOrderByInfo(InternalOrderByInfo &$internalOrderByInfo) |
|
| 755 | + public function setInternalOrderByInfo(InternalOrderByInfo & $internalOrderByInfo) |
|
| 756 | 756 | { |
| 757 | 757 | $this->internalOrderByInfo = $internalOrderByInfo; |
| 758 | 758 | } |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | * @return void |
| 777 | 777 | */ |
| 778 | 778 | public function setInternalSkipTokenInfo( |
| 779 | - InternalSkipTokenInfo &$internalSkipTokenInfo |
|
| 779 | + InternalSkipTokenInfo & $internalSkipTokenInfo |
|
| 780 | 780 | ) { |
| 781 | 781 | $this->_internalSkipTokenInfo = $internalSkipTokenInfo; |
| 782 | 782 | } |
@@ -808,9 +808,9 @@ discard block |
||
| 808 | 808 | * |
| 809 | 809 | * @return void |
| 810 | 810 | */ |
| 811 | - public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode) |
|
| 811 | + public function setRootProjectionNode(RootProjectionNode & $rootProjectionNode) |
|
| 812 | 812 | { |
| 813 | - $this->_rootProjectionNode = $rootProjectionNode; |
|
| 813 | + $this->_rootProjectionNode = $rootProjectionNode; |
|
| 814 | 814 | } |
| 815 | 815 | |
| 816 | 816 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $uriProcessor->request->setUriProcessor($uriProcessor); |
| 115 | 115 | |
| 116 | 116 | //Parse the query string options of the request Uri. |
| 117 | - QueryProcessor::process( $uriProcessor->request, $service ); |
|
| 117 | + QueryProcessor::process($uriProcessor->request, $service); |
|
| 118 | 118 | |
| 119 | 119 | return $uriProcessor; |
| 120 | 120 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | protected function executePut() |
| 177 | 177 | { |
| 178 | - return $this->executeBase(function ($uriProcessor, $segment) { |
|
| 178 | + return $this->executeBase(function($uriProcessor, $segment) { |
|
| 179 | 179 | $requestMethod = $uriProcessor->service->getOperationContext()->incomingRequest()->getMethod(); |
| 180 | 180 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 181 | 181 | $keyDescriptor = $segment->getKeyDescriptor(); |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | protected function executePost() |
| 201 | 201 | { |
| 202 | - return $this->executeBase(function ($uriProcessor, $segment) { |
|
| 202 | + return $this->executeBase(function($uriProcessor, $segment) { |
|
| 203 | 203 | $requestMethod = $uriProcessor->service->getOperationContext()->incomingRequest()->getMethod(); |
| 204 | 204 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 205 | 205 | $data = $uriProcessor->request->getData(); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | protected function executeDelete() |
| 229 | 229 | { |
| 230 | - return $this->executeBase(function ($uriProcessor, $segment) { |
|
| 230 | + return $this->executeBase(function($uriProcessor, $segment) { |
|
| 231 | 231 | $requestMethod = $uriProcessor->service->getOperationContext()->incomingRequest()->getMethod(); |
| 232 | 232 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 233 | 233 | $keyDescriptor = $segment->getKeyDescriptor(); |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | protected function executeBatch() |
| 248 | 248 | { |
| 249 | 249 | $callback = null; |
| 250 | - $post_callback = function ($uriProcessor, $segment) { |
|
| 250 | + $post_callback = function($uriProcessor, $segment) { |
|
| 251 | 251 | $requestMethod = $uriProcessor->service->getOperationContext()->incomingRequest()->getMethod(); |
| 252 | 252 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 253 | 253 | $data = $uriProcessor->request->getData(); |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | } |
| 349 | 349 | |
| 350 | 350 | return; |
| 351 | - return $this->executeBase(function ($uriProcessor, $segment) { |
|
| 351 | + return $this->executeBase(function($uriProcessor, $segment) { |
|
| 352 | 352 | $requestMethod = $uriProcessor->service->getOperationContext()->incomingRequest()->getMethod(); |
| 353 | 353 | $resourceSet = $segment->getTargetResourceSetWrapper(); |
| 354 | 354 | $data = $uriProcessor->request->getData(); |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | * @return void |
| 462 | 462 | * |
| 463 | 463 | */ |
| 464 | - private function handleSegmentTargetsToResourceSet( SegmentDescriptor $segment ) { |
|
| 464 | + private function handleSegmentTargetsToResourceSet(SegmentDescriptor $segment) { |
|
| 465 | 465 | if ($segment->isSingleResult()) { |
| 466 | 466 | $entityInstance = $this->providers->getResourceFromResourceSet( |
| 467 | 467 | $segment->getTargetResourceSetWrapper(), |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | //and just work with the QueryResult in the object model serializer |
| 563 | 563 | $result = $segment->getResult(); |
| 564 | 564 | |
| 565 | - if(!$result instanceof QueryResult){ |
|
| 565 | + if (!$result instanceof QueryResult) { |
|
| 566 | 566 | //If the segment isn't a query result, then there's no paging or counting to be done |
| 567 | 567 | return; |
| 568 | 568 | } |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | //Have POData perform paging if necessary |
| 582 | - if(!$this->providers->handlesOrderedPaging() && !empty($result->results)){ |
|
| 582 | + if (!$this->providers->handlesOrderedPaging() && !empty($result->results)) { |
|
| 583 | 583 | $result->results = $this->performPaging($result->results); |
| 584 | 584 | } |
| 585 | 585 | |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | if (!empty($result)) { |
| 623 | 623 | $top = $this->request->getTopCount(); |
| 624 | 624 | $skip = $this->request->getSkipCount(); |
| 625 | - if(is_null($skip)) $skip = 0; |
|
| 625 | + if (is_null($skip)) $skip = 0; |
|
| 626 | 626 | |
| 627 | 627 | $result = array_slice($result, $skip, $top); |
| 628 | 628 | } |
@@ -829,7 +829,7 @@ discard block |
||
| 829 | 829 | * @throws InvalidOperationException If this function invoked with non-navigation |
| 830 | 830 | * property instance. |
| 831 | 831 | */ |
| 832 | - private function _pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty) |
|
| 832 | + private function _pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty) |
|
| 833 | 833 | { |
| 834 | 834 | if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY) { |
| 835 | 835 | $this->assert( |
@@ -924,7 +924,7 @@ discard block |
||
| 924 | 924 | * |
| 925 | 925 | * @return bool true if the segment was push, false otherwise |
| 926 | 926 | */ |
| 927 | - private function _pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
| 927 | + private function _pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
| 928 | 928 | { |
| 929 | 929 | $rootProjectionNode = $this->request->getRootProjectionNode(); |
| 930 | 930 | if (!is_null($rootProjectionNode) |