@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | * orderby path segments. |
| 73 | 73 | * @param ResourceType &$resourceType Reference to the type of the resource pointed by the request uri. |
| 74 | 74 | */ |
| 75 | - public function __construct(InternalOrderByInfo &$internalOrderByInfo, |
|
| 76 | - $orderByValuesInSkipToken, ResourceType &$resourceType |
|
| 75 | + public function __construct(InternalOrderByInfo & $internalOrderByInfo, |
|
| 76 | + $orderByValuesInSkipToken, ResourceType & $resourceType |
|
| 77 | 77 | ) { |
| 78 | 78 | $this->_internalOrderByInfo = $internalOrderByInfo; |
| 79 | 79 | $this->_orderByValuesInSkipToken = $orderByValuesInSkipToken; |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | } else if ($isLastSegment) { |
| 283 | 283 | $type = $subPathSegment->getInstanceType(); |
| 284 | 284 | $value = $type->convertToOData($currentObject); |
| 285 | - $nextPageLink .= $value . ', '; |
|
| 285 | + $nextPageLink .= $value.', '; |
|
| 286 | 286 | } |
| 287 | 287 | } catch (\ReflectionException $reflectionException) { |
| 288 | 288 | throw ODataException::createInternalServerError( |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * @param array(int,(array(string,IType))) $orderByValuesInSkipToken Collection of values in the skiptoken corrosponds |
| 41 | 41 | * to the orderby path segments. |
| 42 | 42 | */ |
| 43 | - public function __construct(OrderByInfo &$orderByInfo, $orderByValuesInSkipToken) |
|
| 43 | + public function __construct(OrderByInfo & $orderByInfo, $orderByValuesInSkipToken) |
|
| 44 | 44 | { |
| 45 | 45 | $this->_orderByInfo = $orderByInfo; |
| 46 | 46 | $this->_orderByValuesInSkipToken = $orderByValuesInSkipToken; |
@@ -44,8 +44,8 @@ |
||
| 44 | 44 | * @throws ODataException |
| 45 | 45 | */ |
| 46 | 46 | public static function parseSkipTokenClause( |
| 47 | - ResourceType &$resourceType, |
|
| 48 | - InternalOrderByInfo &$internalOrderByInfo, |
|
| 47 | + ResourceType & $resourceType, |
|
| 48 | + InternalOrderByInfo & $internalOrderByInfo, |
|
| 49 | 49 | $skipToken |
| 50 | 50 | ) { |
| 51 | 51 | $tokenValueDescriptor = null; |
@@ -245,8 +245,8 @@ discard block |
||
| 245 | 245 | $this->requestMaxVersion = is_null($maxRequestVersion) ? $this->requestVersion : self::parseVersionHeader($maxRequestVersion, ODataConstants::ODATAMAXVERSIONHEADER); |
| 246 | 246 | |
| 247 | 247 | //if it's OData v3..things change a bit |
| 248 | - if($this->maxServiceVersion == Version::v3()){ |
|
| 249 | - if(is_null($maxRequestVersion)) |
|
| 248 | + if ($this->maxServiceVersion == Version::v3()) { |
|
| 249 | + if (is_null($maxRequestVersion)) |
|
| 250 | 250 | { |
| 251 | 251 | //if max request version isn't specified we use the service max version instead of the request version |
| 252 | 252 | //thus we favour newer versions |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | * @throws ODataException If capability negotiation fails. |
| 283 | 283 | */ |
| 284 | 284 | public function raiseMinVersionRequirement($major, $minor) { |
| 285 | - if($this->requiredMinRequestVersion->raiseVersion($major, $minor)) |
|
| 285 | + if ($this->requiredMinRequestVersion->raiseVersion($major, $minor)) |
|
| 286 | 286 | { |
| 287 | 287 | $this->validateVersions(); |
| 288 | 288 | } |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | * @throws ODataException If capability negotiation fails. |
| 299 | 299 | */ |
| 300 | 300 | public function raiseResponseVersion($major, $minor) { |
| 301 | - if($this->requiredMinResponseVersion->raiseVersion($major, $minor)){ |
|
| 301 | + if ($this->requiredMinResponseVersion->raiseVersion($major, $minor)) { |
|
| 302 | 302 | $this->validateVersions(); |
| 303 | 303 | } |
| 304 | 304 | |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | * |
| 624 | 624 | * @return void |
| 625 | 625 | */ |
| 626 | - public function setInternalOrderByInfo(InternalOrderByInfo &$internalOrderByInfo) |
|
| 626 | + public function setInternalOrderByInfo(InternalOrderByInfo & $internalOrderByInfo) |
|
| 627 | 627 | { |
| 628 | 628 | $this->internalOrderByInfo = $internalOrderByInfo; |
| 629 | 629 | } |
@@ -647,7 +647,7 @@ discard block |
||
| 647 | 647 | * @return void |
| 648 | 648 | */ |
| 649 | 649 | public function setInternalSkipTokenInfo( |
| 650 | - InternalSkipTokenInfo &$internalSkipTokenInfo |
|
| 650 | + InternalSkipTokenInfo & $internalSkipTokenInfo |
|
| 651 | 651 | ) { |
| 652 | 652 | $this->_internalSkipTokenInfo = $internalSkipTokenInfo; |
| 653 | 653 | } |
@@ -679,9 +679,9 @@ discard block |
||
| 679 | 679 | * |
| 680 | 680 | * @return void |
| 681 | 681 | */ |
| 682 | - public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode) |
|
| 682 | + public function setRootProjectionNode(RootProjectionNode & $rootProjectionNode) |
|
| 683 | 683 | { |
| 684 | - $this->_rootProjectionNode = $rootProjectionNode; |
|
| 684 | + $this->_rootProjectionNode = $rootProjectionNode; |
|
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | ); |
| 56 | 56 | $kind = $request->getTargetKind(); |
| 57 | 57 | |
| 58 | - if ($kind == TargetKind::METADATA() || $kind == TargetKind::BATCH() || $kind == TargetKind::SERVICE_DIRECTORY()){ |
|
| 58 | + if ($kind == TargetKind::METADATA() || $kind == TargetKind::BATCH() || $kind == TargetKind::SERVICE_DIRECTORY()) { |
|
| 59 | 59 | return $request; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | // use of $count requires request DataServiceVersion |
| 81 | 81 | // and MaxDataServiceVersion greater than or equal to 2.0 |
| 82 | 82 | |
| 83 | - $request->raiseResponseVersion( 2, 0); |
|
| 84 | - $request->raiseMinVersionRequirement(2, 0 ); |
|
| 83 | + $request->raiseResponseVersion(2, 0); |
|
| 84 | + $request->raiseMinVersionRequirement(2, 0); |
|
| 85 | 85 | |
| 86 | 86 | } else if ($request->isNamedStream()) { |
| 87 | - $request->raiseMinVersionRequirement(3, 0 ); |
|
| 87 | + $request->raiseMinVersionRequirement(3, 0); |
|
| 88 | 88 | } else if ($request->getTargetKind() == TargetKind::RESOURCE()) { |
| 89 | 89 | if (!$request->isLinkUri()) { |
| 90 | 90 | $resourceSetWrapper = $request->getTargetResourceSetWrapper(); |
@@ -94,12 +94,12 @@ discard block |
||
| 94 | 94 | $hasBagProperty = $resourceSetWrapper->hasBagProperty($service->getProvidersWrapper()); |
| 95 | 95 | |
| 96 | 96 | if ($hasNamedStream || $hasBagProperty) { |
| 97 | - $request->raiseResponseVersion( 3, 0 ); |
|
| 97 | + $request->raiseResponseVersion(3, 0); |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | } else if ($request->getTargetKind() == TargetKind::BAG() |
| 101 | 101 | ) { |
| 102 | - $request->raiseResponseVersion( 3, 0 ); |
|
| 102 | + $request->raiseResponseVersion(3, 0); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
@@ -271,7 +271,7 @@ |
||
| 271 | 271 | if (!array_key_exists($keyName, $this->_namedValues)) { |
| 272 | 272 | $keysAsString = null; |
| 273 | 273 | foreach (array_keys($keyProperties) as $key) { |
| 274 | - $keysAsString .= $key . ', '; |
|
| 274 | + $keysAsString .= $key.', '; |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | $keysAsString = rtrim($keysAsString, ' ,'); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param ProvidersWrapper $providerWrapper Reference to metadata and query provider wrapper |
| 52 | 52 | * |
| 53 | 53 | */ |
| 54 | - private function __construct(ProvidersWrapper $providerWrapper ) { |
|
| 54 | + private function __construct(ProvidersWrapper $providerWrapper) { |
|
| 55 | 55 | $this->providerWrapper = $providerWrapper; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - private function createNextSegment(SegmentDescriptor $previous, $segment, $checkRights){ |
|
| 145 | + private function createNextSegment(SegmentDescriptor $previous, $segment, $checkRights) { |
|
| 146 | 146 | $previousKind = $previous->getTargetKind(); |
| 147 | 147 | if ($previousKind == TargetKind::METADATA() |
| 148 | 148 | || $previousKind == TargetKind::BATCH() |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | ); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | - switch($projectedProperty->getKind()) { |
|
| 266 | + switch ($projectedProperty->getKind()) { |
|
| 267 | 267 | case ResourcePropertyKind::COMPLEX_TYPE: |
| 268 | 268 | $current->setTargetKind(TargetKind::COMPLEX_OBJECT()); |
| 269 | 269 | break; |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | if ($hasPredicate) { |
| 298 | 298 | $this->_assertion(!$current->isSingleResult()); |
| 299 | 299 | $keyDescriptor = $this->_createKeyDescriptor( |
| 300 | - $identifier . '(' . $keyPredicate . ')', |
|
| 300 | + $identifier.'('.$keyPredicate.')', |
|
| 301 | 301 | $projectedProperty->getResourceType(), |
| 302 | 302 | $keyPredicate |
| 303 | 303 | ); |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | } |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | - if ($checkRights&& !is_null($current->getTargetResourceSetWrapper())) { |
|
| 310 | + if ($checkRights && !is_null($current->getTargetResourceSetWrapper())) { |
|
| 311 | 311 | $current->getTargetResourceSetWrapper() |
| 312 | 312 | ->checkResourceSetRightsForRead( |
| 313 | 313 | $current->isSingleResult() |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | $descriptor->setTargetKind(TargetKind::RESOURCE()); |
| 374 | 374 | if ($keyPredicate !== null) { |
| 375 | 375 | $keyDescriptor = $this->_createKeyDescriptor( |
| 376 | - $segmentIdentifier . '(' . $keyPredicate . ')', |
|
| 376 | + $segmentIdentifier.'('.$keyPredicate.')', |
|
| 377 | 377 | $resourceSetWrapper->getResourceType(), |
| 378 | 378 | $keyPredicate |
| 379 | 379 | ); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * e.g. http://localhost/myservice.svc/Customers('ALFKI')/CustomerName/$value |
| 59 | 59 | * http://localhost/myservice.svc/Customers/$count |
| 60 | 60 | */ |
| 61 | - const PRIMITIVE_VALUE= 6; |
|
| 61 | + const PRIMITIVE_VALUE = 6; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * System metadata. |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 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 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | * @return void |
| 218 | 218 | * |
| 219 | 219 | */ |
| 220 | - private function handleSegmentTargetsToResourceSet( SegmentDescriptor $segment ) { |
|
| 220 | + private function handleSegmentTargetsToResourceSet(SegmentDescriptor $segment) { |
|
| 221 | 221 | if ($segment->isSingleResult()) { |
| 222 | 222 | $entityInstance = $this->providers->getResourceFromResourceSet( |
| 223 | 223 | $segment->getTargetResourceSetWrapper(), |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | //and just work with the QueryResult in the object model serializer |
| 308 | 308 | $result = $segment->getResult(); |
| 309 | 309 | |
| 310 | - if(!$result instanceof QueryResult){ |
|
| 310 | + if (!$result instanceof QueryResult) { |
|
| 311 | 311 | //If the segment isn't a query result, then there's no paging or counting to be done |
| 312 | 312 | return; |
| 313 | 313 | } |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | //Have POData perform paging if necessary |
| 327 | - if(!$this->providers->handlesOrderedPaging() && !empty($result->results)){ |
|
| 327 | + if (!$this->providers->handlesOrderedPaging() && !empty($result->results)) { |
|
| 328 | 328 | $result->results = $this->performPaging($result->results); |
| 329 | 329 | } |
| 330 | 330 | |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | if (!empty($result)) { |
| 368 | 368 | $top = $this->request->getTopCount(); |
| 369 | 369 | $skip = $this->request->getSkipCount(); |
| 370 | - if(is_null($skip)) $skip = 0; |
|
| 370 | + if (is_null($skip)) $skip = 0; |
|
| 371 | 371 | |
| 372 | 372 | $result = array_slice($result, $skip, $top); |
| 373 | 373 | } |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | * @throws InvalidOperationException If this function invoked with non-navigation |
| 575 | 575 | * property instance. |
| 576 | 576 | */ |
| 577 | - private function _pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty) |
|
| 577 | + private function _pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty) |
|
| 578 | 578 | { |
| 579 | 579 | if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY) { |
| 580 | 580 | $this->assert( |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | * |
| 670 | 670 | * @return bool true if the segment was push, false otherwise |
| 671 | 671 | */ |
| 672 | - private function _pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
| 672 | + private function _pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
| 673 | 673 | { |
| 674 | 674 | $rootProjectionNode = $this->request->getRootProjectionNode(); |
| 675 | 675 | if (!is_null($rootProjectionNode) |