@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | public static function resourcePropertyInvalidKindParameter($argumentName) |
| 15 | 15 | { |
| 16 | 16 | return 'The argument \''.$argumentName.'\' is not a valid ResourcePropertyKind enum value or' |
| 17 | - .' valid combination of ResourcePropertyKind enum values'; |
|
| 17 | + .' valid combination of ResourcePropertyKind enum values'; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -30,6 +30,6 @@ discard block |
||
| 30 | 30 | $resourceTypeArgName |
| 31 | 31 | ) { |
| 32 | 32 | return 'The \''.$resourcePropertyKindArgName.'\' parameter does not match with the type of the resource' |
| 33 | - .' type in parameter \''.$resourceTypeArgName.'\''; |
|
| 33 | + .' type in parameter \''.$resourceTypeArgName.'\''; |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public static function resourcePropertyInvalidKindParameter($argumentName) |
| 15 | 15 | { |
| 16 | - return 'The argument \''.$argumentName.'\' is not a valid ResourcePropertyKind enum value or' |
|
| 16 | + return 'The argument \'' . $argumentName . '\' is not a valid ResourcePropertyKind enum value or' |
|
| 17 | 17 | .' valid combination of ResourcePropertyKind enum values'; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $resourcePropertyKindArgName, |
| 30 | 30 | $resourceTypeArgName |
| 31 | 31 | ) { |
| 32 | - return 'The \''.$resourcePropertyKindArgName.'\' parameter does not match with the type of the resource' |
|
| 33 | - .' type in parameter \''.$resourceTypeArgName.'\''; |
|
| 32 | + return 'The \'' . $resourcePropertyKindArgName . '\' parameter does not match with the type of the resource' |
|
| 33 | + .' type in parameter \'' . $resourceTypeArgName . '\''; |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $expectedCount |
| 45 | 45 | ) { |
| 46 | 46 | return 'The number of keys \'' . $skipTokenValuesCount . '\' in skip token with value \'' . $skipToken . |
| 47 | - '\' did not match the number of ordering constraints \'' . $expectedCount . '\' for the resource type.'; |
|
| 47 | + '\' did not match the number of ordering constraints \'' . $expectedCount . '\' for the resource type.'; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | public static function requestVersionTooLow($requestedVersion, $requiredVersion) |
| 18 | 18 | { |
| 19 | 19 | return 'Request version \''.$requestedVersion.'\' is not supported for the request payload. The only' |
| 20 | - .' supported version is \''.$requiredVersion.'\'.'; |
|
| 20 | + .' supported version is \''.$requiredVersion.'\'.'; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion) |
| 33 | 33 | { |
| 34 | 34 | return 'The response requires that version '.$requiredVersion.' of the protocol be used, but the' |
| 35 | - .' MaxProtocolVersion of the data service is set to '.$configuredVersion.'.'; |
|
| 35 | + .' MaxProtocolVersion of the data service is set to '.$configuredVersion.'.'; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -65,6 +65,6 @@ discard block |
||
| 65 | 65 | $availableVersions |
| 66 | 66 | ) { |
| 67 | 67 | return 'The version value '.$requestedVersion.' in the header '.$requestHeaderName.' is not' |
| 68 | - .' supported, available versions are '.$availableVersions; |
|
| 68 | + .' supported, available versions are '.$availableVersions; |
|
| 69 | 69 | } |
| 70 | 70 | } |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public static function requestVersionTooLow($requestedVersion, $requiredVersion) |
| 18 | 18 | { |
| 19 | - return 'Request version \''.$requestedVersion.'\' is not supported for the request payload. The only' |
|
| 20 | - .' supported version is \''.$requiredVersion.'\'.'; |
|
| 19 | + return 'Request version \'' . $requestedVersion . '\' is not supported for the request payload. The only' |
|
| 20 | + .' supported version is \'' . $requiredVersion . '\'.'; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion) |
| 33 | 33 | { |
| 34 | - return 'The response requires that version '.$requiredVersion.' of the protocol be used, but the' |
|
| 35 | - .' MaxProtocolVersion of the data service is set to '.$configuredVersion.'.'; |
|
| 34 | + return 'The response requires that version ' . $requiredVersion . ' of the protocol be used, but the' |
|
| 35 | + .' MaxProtocolVersion of the data service is set to ' . $configuredVersion . '.'; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public static function requestDescriptionInvalidVersionHeader($versionAsString, $headerName) |
| 48 | 48 | { |
| 49 | - return 'The header '.$headerName.' has malformed version value '.$versionAsString; |
|
| 49 | + return 'The header ' . $headerName . ' has malformed version value ' . $versionAsString; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $requestedVersion, |
| 65 | 65 | $availableVersions |
| 66 | 66 | ) { |
| 67 | - return 'The version value '.$requestedVersion.' in the header '.$requestHeaderName.' is not' |
|
| 68 | - .' supported, available versions are '.$availableVersions; |
|
| 67 | + return 'The version value ' . $requestedVersion . ' in the header ' . $requestHeaderName . ' is not' |
|
| 68 | + .' supported, available versions are ' . $availableVersions; |
|
| 69 | 69 | } |
| 70 | 70 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public static function orderByParserPropertyNotFound($resourceTypeName, $propertyName) |
| 51 | 51 | { |
| 52 | 52 | return 'Error in the \'orderby\' clause. Type ' . $resourceTypeName |
| 53 | - . ' does not have a property named \'' . $propertyName . '\'.'; |
|
| 53 | + . ' does not have a property named \'' . $propertyName . '\'.'; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -179,6 +179,6 @@ discard block |
||
| 179 | 179 | public static function orderByParserFailedToAccessOrInitializeProperty($propertyName, $parentObjectName) |
| 180 | 180 | { |
| 181 | 181 | return 'OrderBy parser failed to access or initialize the property ' . $propertyName . |
| 182 | - ' of ' . $parentObjectName; |
|
| 182 | + ' of ' . $parentObjectName; |
|
| 183 | 183 | } |
| 184 | 184 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | * @throws InvalidOperationException |
| 51 | 51 | * @return bool true if the segment was push, false otherwise |
| 52 | 52 | */ |
| 53 | - public function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
| 53 | + public function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
| 54 | 54 | { |
| 55 | 55 | if (!is_string($segmentName)) { |
| 56 | 56 | throw new InvalidOperationException('segmentName must be a string'); |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * |
| 300 | 300 | * @return bool true if a segment was pushed, false otherwise |
| 301 | 301 | */ |
| 302 | - protected function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty) |
|
| 302 | + protected function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty) |
|
| 303 | 303 | { |
| 304 | 304 | if (ResourceTypeKind::ENTITY() == $resourceProperty->getTypeKind()) { |
| 305 | 305 | assert(!empty($this->getStack()->getSegmentNames()), 'Segment names should not be empty'); |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | * |
| 413 | 413 | * @return bool true if the segment was push, false otherwise |
| 414 | 414 | */ |
| 415 | - private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
| 415 | + private function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
| 416 | 416 | { |
| 417 | 417 | // Even though there is no expand in the request URI, still we need to push |
| 418 | 418 | // the segment information if we need to count |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | &$parentPathSegments, |
| 630 | 630 | &$selectionPaths, |
| 631 | 631 | &$expansionPaths, |
| 632 | - ExpandedProjectionNode &$expandedProjectionNode, |
|
| 632 | + ExpandedProjectionNode & $expandedProjectionNode, |
|
| 633 | 633 | &$foundSelections, |
| 634 | 634 | &$foundExpansions |
| 635 | 635 | ) { |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | * |
| 195 | 195 | * @return bool true if a segment was pushed, false otherwise |
| 196 | 196 | */ |
| 197 | - private function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty) |
|
| 197 | + private function pushSegmentForNavigationProperty(ResourceProperty & $resourceProperty) |
|
| 198 | 198 | { |
| 199 | 199 | if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY()) { |
| 200 | 200 | assert(!empty($this->getStack()->getSegmentNames()), '!is_empty($this->getStack()->getSegmentNames())'); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | * |
| 280 | 280 | * @return bool true if the segment was push, false otherwise |
| 281 | 281 | */ |
| 282 | - private function pushSegment($segmentName, ResourceSetWrapper &$resourceSetWrapper) |
|
| 282 | + private function pushSegment($segmentName, ResourceSetWrapper & $resourceSetWrapper) |
|
| 283 | 283 | { |
| 284 | 284 | return $this->getStack()->pushSegment($segmentName, $resourceSetWrapper); |
| 285 | 285 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | ); |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - $builtServiceUri = $requestUriScheme .'://' . $this->getAbsoluteRequestUri()->getHost(); |
|
| 225 | + $builtServiceUri = $requestUriScheme . '://' . $this->getAbsoluteRequestUri()->getHost(); |
|
| 226 | 226 | |
| 227 | 227 | if (($requestUriScheme == 'http' && $requestUriPort != '80') || |
| 228 | 228 | ($requestUriScheme == 'https' && $requestUriPort != '443') |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | $this->getOperationContext()->outgoingResponse()->setContentLength($value); |
| 512 | 512 | } else { |
| 513 | 513 | throw ODataException::notAcceptableError( |
| 514 | - 'ContentLength: '.$value.' is invalid' |
|
| 514 | + 'ContentLength: ' . $value . ' is invalid' |
|
| 515 | 515 | ); |
| 516 | 516 | } |
| 517 | 517 | } |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | public function setResponseStatusCode($value) |
| 557 | 557 | { |
| 558 | 558 | if (!is_numeric($value)) { |
| 559 | - $msg = 'Invalid, non-numeric, status code: '.$value; |
|
| 559 | + $msg = 'Invalid, non-numeric, status code: ' . $value; |
|
| 560 | 560 | throw ODataException::createInternalServerError($msg); |
| 561 | 561 | } |
| 562 | 562 | $floor = floor($value/100); |
@@ -565,10 +565,10 @@ |
||
| 565 | 565 | { |
| 566 | 566 | $queryParameterString = null; |
| 567 | 567 | foreach ([ODataConstants::HTTPQUERY_STRING_FILTER, |
| 568 | - ODataConstants::HTTPQUERY_STRING_EXPAND, |
|
| 569 | - ODataConstants::HTTPQUERY_STRING_ORDERBY, |
|
| 570 | - ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
|
| 571 | - ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
| 568 | + ODataConstants::HTTPQUERY_STRING_EXPAND, |
|
| 569 | + ODataConstants::HTTPQUERY_STRING_ORDERBY, |
|
| 570 | + ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
|
| 571 | + ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
| 572 | 572 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
| 573 | 573 | if (null !== $value) { |
| 574 | 574 | if (null !== $queryParameterString) { |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->loadStackIfEmpty(); |
| 112 | 112 | |
| 113 | 113 | $stackCount = count($this->lightStack); |
| 114 | - $topOfStack = $this->lightStack[$stackCount-1]; |
|
| 114 | + $topOfStack = $this->lightStack[$stackCount - 1]; |
|
| 115 | 115 | $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack[0]); |
| 116 | 116 | assert($resourceType instanceof ResourceType, get_class($resourceType)); |
| 117 | 117 | $rawProp = $resourceType->getAllProperties(); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | .' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE' |
| 173 | 173 | ); |
| 174 | 174 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
| 175 | - $propType = 'application/atom+xml;type='.$propTail; |
|
| 175 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
| 176 | 176 | $propName = $prop->getName(); |
| 177 | 177 | $nuLink->title = $propName; |
| 178 | 178 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * |
| 216 | 216 | * @return ODataFeed |
| 217 | 217 | */ |
| 218 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
| 218 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
| 219 | 219 | { |
| 220 | 220 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
| 221 | 221 | |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | * |
| 337 | 337 | * @return ODataPropertyContent |
| 338 | 338 | */ |
| 339 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType) |
|
| 339 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) |
|
| 340 | 340 | { |
| 341 | 341 | $result = $complexValue->results; |
| 342 | 342 | |
@@ -364,14 +364,14 @@ discard block |
||
| 364 | 364 | * |
| 365 | 365 | * @return ODataPropertyContent |
| 366 | 366 | */ |
| 367 | - public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType) |
|
| 367 | + public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType) |
|
| 368 | 368 | { |
| 369 | 369 | $result = $bagValue->results; |
| 370 | 370 | |
| 371 | 371 | $propertyContent = new ODataPropertyContent(); |
| 372 | 372 | $odataProperty = new ODataProperty(); |
| 373 | 373 | $odataProperty->name = $propertyName; |
| 374 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
| 374 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
| 375 | 375 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
| 376 | 376 | |
| 377 | 377 | $propertyContent->properties[] = $odataProperty; |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | * |
| 387 | 387 | * @return ODataPropertyContent |
| 388 | 388 | */ |
| 389 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null) |
|
| 389 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) |
|
| 390 | 390 | { |
| 391 | 391 | assert(null !== $resourceProperty, 'Resource property must not be null'); |
| 392 | 392 | $result = new ODataPropertyContent(); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | * @param $result |
| 469 | 469 | * @return ODataBagContent|null |
| 470 | 470 | */ |
| 471 | - protected function writeBagValue(ResourceType &$resourceType, $result) |
|
| 471 | + protected function writeBagValue(ResourceType & $resourceType, $result) |
|
| 472 | 472 | { |
| 473 | 473 | assert(null === $result || is_array($result), 'Bag parameter must be null or array'); |
| 474 | 474 | $typeKind = $resourceType->getResourceTypeKind(); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | * @param string|null $propertyName |
| 502 | 502 | * @return ODataPropertyContent |
| 503 | 503 | */ |
| 504 | - protected function writeComplexValue(ResourceType &$resourceType, &$result, $propertyName = null) |
|
| 504 | + protected function writeComplexValue(ResourceType & $resourceType, &$result, $propertyName = null) |
|
| 505 | 505 | { |
| 506 | 506 | assert(is_object($result), 'Supplied $customObject must be an object'); |
| 507 | 507 | |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
| 656 | 656 | assert(!is_null($skipToken), '!is_null($skipToken)'); |
| 657 | 657 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
| 658 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
| 658 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
| 659 | 659 | |
| 660 | 660 | return $skipToken; |
| 661 | 661 | } |
@@ -905,7 +905,7 @@ discard block |
||
| 905 | 905 | * |
| 906 | 906 | * @return string |
| 907 | 907 | */ |
| 908 | - private function primitiveToString(IType &$type, $primitiveValue) |
|
| 908 | + private function primitiveToString(IType & $type, $primitiveValue) |
|
| 909 | 909 | { |
| 910 | 910 | if ($type instanceof Boolean) { |
| 911 | 911 | $stringValue = (true === $primitiveValue) ? 'true' : 'false'; |
@@ -930,6 +930,6 @@ discard block |
||
| 930 | 930 | if (28 < $resourceKind) { |
| 931 | 931 | return false; |
| 932 | 932 | } |
| 933 | - return 0 == ($resourceKind % 4); |
|
| 933 | + return 0 == ($resourceKind%4); |
|
| 934 | 934 | } |
| 935 | 935 | } |