@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | */ |
683 | 683 | protected function compareETag( |
684 | 684 | &$entryObject, |
685 | - ResourceType &$resourceType, |
|
685 | + 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; |
@@ -68,9 +68,9 @@ |
||
68 | 68 | * @param ResourceType &$resourceType Reference to the resource type pointed to by the request uri |
69 | 69 | */ |
70 | 70 | public function __construct( |
71 | - InternalOrderByInfo &$internalOrderByInfo, |
|
71 | + InternalOrderByInfo & $internalOrderByInfo, |
|
72 | 72 | $orderByValuesInSkipToken, |
73 | - ResourceType &$resourceType |
|
73 | + ResourceType & $resourceType |
|
74 | 74 | ) { |
75 | 75 | $this->internalOrderByInfo = $internalOrderByInfo; |
76 | 76 | $this->orderByValuesInSkipToken = $orderByValuesInSkipToken; |
@@ -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 | } |
@@ -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 @@ |
||
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 | ) { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return ODataFeed |
77 | 77 | */ |
78 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
78 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
79 | 79 | { |
80 | 80 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
81 | 81 | $requestTargetSource = $this->getRequest()->getTargetSource(); |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | * @return ODataPropertyContent |
192 | 192 | */ |
193 | 193 | public function writeTopLevelComplexObject( |
194 | - QueryResult &$complexValue, |
|
194 | + QueryResult & $complexValue, |
|
195 | 195 | $propertyName, |
196 | - ResourceType &$resourceType |
|
196 | + ResourceType & $resourceType |
|
197 | 197 | ) { |
198 | 198 | $propertyContent = new ODataPropertyContent(); |
199 | 199 | $this->writeComplexValue( |
@@ -216,9 +216,9 @@ discard block |
||
216 | 216 | * @return ODataPropertyContent |
217 | 217 | */ |
218 | 218 | public function writeTopLevelBagObject( |
219 | - QueryResult &$bagValue, |
|
219 | + QueryResult & $bagValue, |
|
220 | 220 | $propertyName, |
221 | - ResourceType &$resourceType |
|
221 | + ResourceType & $resourceType |
|
222 | 222 | ) { |
223 | 223 | $propertyContent = new ODataPropertyContent(); |
224 | 224 | $this->writeBagValue( |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | * @return ODataPropertyContent |
242 | 242 | */ |
243 | 243 | public function writeTopLevelPrimitive( |
244 | - QueryResult &$primitiveValue, |
|
245 | - ResourceProperty &$resourceProperty = null |
|
244 | + QueryResult & $primitiveValue, |
|
245 | + ResourceProperty & $resourceProperty = null |
|
246 | 246 | ) { |
247 | 247 | assert(null != $resourceProperty, 'Resource property must not be null'); |
248 | 248 | $propertyContent = new ODataPropertyContent(); |
@@ -330,11 +330,11 @@ discard block |
||
330 | 330 | */ |
331 | 331 | private function writeFeedElements( |
332 | 332 | &$entryObjects, |
333 | - ResourceType &$resourceType, |
|
333 | + ResourceType & $resourceType, |
|
334 | 334 | $title, |
335 | 335 | $absoluteUri, |
336 | 336 | $relativeUri, |
337 | - ODataFeed &$feed, |
|
337 | + ODataFeed & $feed, |
|
338 | 338 | $needLink = false |
339 | 339 | ) { |
340 | 340 | assert(is_array($entryObjects), '!_writeFeedElements::is_array($entryObjects)'); |
@@ -393,11 +393,11 @@ discard block |
||
393 | 393 | */ |
394 | 394 | private function writeObjectProperties( |
395 | 395 | $customObject, |
396 | - ResourceType &$resourceType, |
|
396 | + ResourceType & $resourceType, |
|
397 | 397 | $absoluteUri, |
398 | 398 | $relativeUri, |
399 | 399 | &$odataEntry, |
400 | - ODataPropertyContent &$odataPropertyContent |
|
400 | + ODataPropertyContent & $odataPropertyContent |
|
401 | 401 | ) { |
402 | 402 | $resourceTypeKind = $resourceType->getResourceTypeKind(); |
403 | 403 | if ((null === $absoluteUri) == (ResourceTypeKind::ENTITY() == $resourceTypeKind) |
@@ -521,8 +521,8 @@ discard block |
||
521 | 521 | */ |
522 | 522 | private function writePrimitiveValue( |
523 | 523 | &$primitiveValue, |
524 | - ODataProperty &$odataProperty, |
|
525 | - ResourceProperty &$resourceProperty |
|
524 | + ODataProperty & $odataProperty, |
|
525 | + ResourceProperty & $resourceProperty |
|
526 | 526 | ) { |
527 | 527 | if (is_object($primitiveValue)) { |
528 | 528 | //TODO ERROR: The property 'PropertyName' |
@@ -556,9 +556,9 @@ discard block |
||
556 | 556 | private function writeComplexValue( |
557 | 557 | &$complexValue, |
558 | 558 | $propertyName, |
559 | - ResourceType &$resourceType, |
|
559 | + ResourceType & $resourceType, |
|
560 | 560 | $relativeUri, |
561 | - ODataPropertyContent &$odataPropertyContent |
|
561 | + ODataPropertyContent & $odataPropertyContent |
|
562 | 562 | ) { |
563 | 563 | $odataProperty = new ODataProperty(); |
564 | 564 | $odataProperty->name = $propertyName; |
@@ -599,9 +599,9 @@ discard block |
||
599 | 599 | private function writeBagValue( |
600 | 600 | &$bagValue, |
601 | 601 | $propertyName, |
602 | - ResourceType &$resourceType, |
|
602 | + ResourceType & $resourceType, |
|
603 | 603 | $relativeUri, |
604 | - ODataPropertyContent &$odataPropertyContent |
|
604 | + ODataPropertyContent & $odataPropertyContent |
|
605 | 605 | ) { |
606 | 606 | assert(null == $bagValue || is_array($bagValue), 'Bag parameter must be null or array'); |
607 | 607 | $bagItemResourceTypeKind = $resourceType->getResourceTypeKind(); |
@@ -659,10 +659,10 @@ discard block |
||
659 | 659 | */ |
660 | 660 | private function writeMediaResourceMetadata( |
661 | 661 | $entryObject, |
662 | - ResourceType &$resourceType, |
|
662 | + ResourceType & $resourceType, |
|
663 | 663 | $title, |
664 | 664 | $relativeUri, |
665 | - ODataEntry &$odataEntry |
|
665 | + ODataEntry & $odataEntry |
|
666 | 666 | ) { |
667 | 667 | $streamProviderWrapper = $this->getService()->getStreamProviderWrapper(); |
668 | 668 | assert(null != $streamProviderWrapper, 'Retrieved stream provider must not be null'); |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | * @return string |
736 | 736 | */ |
737 | 737 | private function primitiveToString( |
738 | - ResourceType &$primitiveResourceType, |
|
738 | + ResourceType & $primitiveResourceType, |
|
739 | 739 | $primitiveValue |
740 | 740 | ) { |
741 | 741 | $type = $primitiveResourceType->getInstanceType(); |
@@ -775,9 +775,9 @@ discard block |
||
775 | 775 | private function complexObjectToContent( |
776 | 776 | &$complexValue, |
777 | 777 | $propertyName, |
778 | - ResourceType &$resourceType, |
|
778 | + ResourceType & $resourceType, |
|
779 | 779 | $relativeUri, |
780 | - ODataPropertyContent &$odataPropertyContent |
|
780 | + ODataPropertyContent & $odataPropertyContent |
|
781 | 781 | ) { |
782 | 782 | $count = count($this->complexTypeInstanceCollection); |
783 | 783 | for ($i = 0; $i < $count; ++$i) { |
@@ -820,9 +820,9 @@ discard block |
||
820 | 820 | */ |
821 | 821 | private function writeObjectPropertiesUnexpanded( |
822 | 822 | $customObject, |
823 | - ResourceType &$resourceType, |
|
823 | + ResourceType & $resourceType, |
|
824 | 824 | $relativeUri, |
825 | - ODataPropertyContent &$odataPropertyContent, |
|
825 | + ODataPropertyContent & $odataPropertyContent, |
|
826 | 826 | ResourceTypeKind $resourceTypeKind, |
827 | 827 | $navigationProperties |
828 | 828 | ) { |
@@ -940,9 +940,9 @@ discard block |
||
940 | 940 | */ |
941 | 941 | private function writeObjectPropertiesExpanded( |
942 | 942 | $customObject, |
943 | - ResourceType &$resourceType, |
|
943 | + ResourceType & $resourceType, |
|
944 | 944 | $relativeUri, |
945 | - ODataPropertyContent &$odataPropertyContent, |
|
945 | + ODataPropertyContent & $odataPropertyContent, |
|
946 | 946 | $projectionNodes, |
947 | 947 | $navigationProperties |
948 | 948 | ) { |
@@ -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); |