@@ -131,7 +131,7 @@ |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $this->rawUrl .= '://' . |
| 134 | - $_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]; |
|
| 134 | + $_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]; |
|
| 135 | 135 | $this->rawUrl .= utf8_decode(urldecode($_SERVER[ODataConstants::HTTPREQUEST_URI])); |
| 136 | 136 | } |
| 137 | 137 | |
@@ -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 | } |
@@ -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) { |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $this->isBaseWritten = true; |
| 131 | 131 | |
| 132 | 132 | $stackCount = count($this->lightStack); |
| 133 | - $topOfStack = $this->lightStack[$stackCount-1]; |
|
| 133 | + $topOfStack = $this->lightStack[$stackCount - 1]; |
|
| 134 | 134 | $resourceType = $this->getService()->getProvidersWrapper()->resolveResourceType($topOfStack['type']); |
| 135 | 135 | assert($resourceType instanceof ResourceType, get_class($resourceType)); |
| 136 | 136 | $rawProp = $resourceType->getAllProperties(); |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | $nonRelCount = count($nonRelProp); |
| 153 | 153 | assert( |
| 154 | 154 | $rawCount == $relCount + $nonRelCount, |
| 155 | - 'Raw property count '.$rawCount.', does not equal sum of relProp count, '.$relCount |
|
| 156 | - .', and nonRelPropCount,'.$nonRelCount |
|
| 155 | + 'Raw property count ' . $rawCount . ', does not equal sum of relProp count, ' . $relCount |
|
| 156 | + .', and nonRelPropCount,' . $nonRelCount |
|
| 157 | 157 | ); |
| 158 | 158 | |
| 159 | 159 | // now mask off against projNodes |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | ); |
| 202 | 202 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
| 203 | 203 | $nuLink->isCollection = 'feed' === $propTail; |
| 204 | - $propType = 'application/atom+xml;type='.$propTail; |
|
| 204 | + $propType = 'application/atom+xml;type=' . $propTail; |
|
| 205 | 205 | $propName = $prop->getName(); |
| 206 | 206 | $nuLink->title = $propName; |
| 207 | 207 | $nuLink->name = ODataConstants::ODATA_RELATED_NAMESPACE . $propName; |
@@ -242,8 +242,8 @@ discard block |
||
| 242 | 242 | $newCount == $stackCount, |
| 243 | 243 | 'Should have ' . $stackCount . 'elements in stack, have ' . $newCount . 'elements' |
| 244 | 244 | ); |
| 245 | - $this->lightStack[$newCount-1]['count']--; |
|
| 246 | - if (0 == $this->lightStack[$newCount-1]['count']) { |
|
| 245 | + $this->lightStack[$newCount - 1]['count']--; |
|
| 246 | + if (0 == $this->lightStack[$newCount - 1]['count']) { |
|
| 247 | 247 | array_pop($this->lightStack); |
| 248 | 248 | } |
| 249 | 249 | return $odata; |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | $propertyContent = new ODataPropertyContent(); |
| 430 | 430 | $odataProperty = new ODataProperty(); |
| 431 | 431 | $odataProperty->name = $propertyName; |
| 432 | - $odataProperty->typeName = 'Collection('.$resourceType->getFullName().')'; |
|
| 432 | + $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')'; |
|
| 433 | 433 | $odataProperty->value = $this->writeBagValue($resourceType, $result); |
| 434 | 434 | |
| 435 | 435 | $propertyContent->properties[$propertyName] = $odataProperty; |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $skipToken = $internalOrderByInfo->buildSkipTokenValue($lastObject); |
| 725 | 725 | assert(null !== $skipToken, '!is_null($skipToken)'); |
| 726 | 726 | $token = (1 < $numSegments) ? '$skiptoken=' : '$skip='; |
| 727 | - $skipToken = '?'.$queryParameterString.$token.$skipToken; |
|
| 727 | + $skipToken = '?' . $queryParameterString . $token . $skipToken; |
|
| 728 | 728 | |
| 729 | 729 | return $skipToken; |
| 730 | 730 | } |
@@ -1012,6 +1012,6 @@ discard block |
||
| 1012 | 1012 | if (28 < $resourceKind) { |
| 1013 | 1013 | return false; |
| 1014 | 1014 | } |
| 1015 | - return 0 == ($resourceKind % 4); |
|
| 1015 | + return 0 == ($resourceKind%4); |
|
| 1016 | 1016 | } |
| 1017 | 1017 | } |
@@ -76,6 +76,6 @@ |
||
| 76 | 76 | $this->eTag = $eTag; |
| 77 | 77 | $this->name = $name; |
| 78 | 78 | $this->srcLink = $srcLink; |
| 79 | - $this->rel = (null !== $rel) ? $rel : self::MEDIARESOURCE_BASE.$name; |
|
| 79 | + $this->rel = (null !== $rel) ? $rel : self::MEDIARESOURCE_BASE . $name; |
|
| 80 | 80 | } |
| 81 | 81 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | $payloadType = $payload->type->term; |
| 36 | 36 | $pay = explode('.', $payloadType); |
| 37 | - $payloadType = $pay[count($pay)-1]; |
|
| 37 | + $payloadType = $pay[count($pay) - 1]; |
|
| 38 | 38 | $actualType = $entityType->getName(); |
| 39 | 39 | |
| 40 | 40 | if ($payloadType !== $actualType) { |