@@ -50,7 +50,7 @@ |
||
50 | 50 | * |
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'); |
@@ -132,7 +132,7 @@ |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | $this->rawUrl .= '://' . |
135 | - $_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]; |
|
135 | + $_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]; |
|
136 | 136 | $this->rawUrl .= utf8_decode(urldecode($_SERVER[ODataConstants::HTTPREQUEST_URI])); |
137 | 137 | } |
138 | 138 |
@@ -157,8 +157,8 @@ |
||
157 | 157 | |
158 | 158 | case 'Edm.DateTime': |
159 | 159 | $dateTime = new Carbon($value, new \DateTimeZone('UTC')); |
160 | - $formattedDateTime = $dateTime->format('U') * 1000; |
|
161 | - $this->writeCore('/Date('.$formattedDateTime.')/', /* quotes */ true); |
|
160 | + $formattedDateTime = $dateTime->format('U')*1000; |
|
161 | + $this->writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true); |
|
162 | 162 | break; |
163 | 163 | |
164 | 164 | case 'Edm.String': |
@@ -411,7 +411,7 @@ |
||
411 | 411 | $this->getRequest()->getFilterInfo(), |
412 | 412 | null, // $orderby |
413 | 413 | null, // $top |
414 | - null, // $skip |
|
414 | + null, // $skip |
|
415 | 415 | $skipToken |
416 | 416 | ); |
417 | 417 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function getLeft() |
40 | 40 | { |
41 | - return isset($this->left) ? $this->left: null; |
|
41 | + return isset($this->left) ? $this->left : null; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -430,7 +430,8 @@ |
||
430 | 430 | $resourceTypeKind, |
431 | 431 | $navigationProperties |
432 | 432 | ); |
433 | - } else { //This is the code path to handle projected properties of Entry |
|
433 | + } else { |
|
434 | +//This is the code path to handle projected properties of Entry |
|
434 | 435 | list($odataPropertyContent, $navigationProperties) = $this->writeObjectPropertiesExpanded( |
435 | 436 | $customObject, |
436 | 437 | $resourceType, |
@@ -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,7 +191,7 @@ discard block |
||
191 | 191 | * @return ODataPropertyContent |
192 | 192 | */ |
193 | 193 | public function writeTopLevelComplexObject( |
194 | - QueryResult &$complexValue, |
|
194 | + QueryResult & $complexValue, |
|
195 | 195 | $propertyName, |
196 | 196 | ResourceType & $resourceType |
197 | 197 | ) { |
@@ -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)'); |
@@ -391,11 +391,11 @@ discard block |
||
391 | 391 | */ |
392 | 392 | private function writeObjectProperties( |
393 | 393 | $customObject, |
394 | - ResourceType &$resourceType, |
|
394 | + ResourceType & $resourceType, |
|
395 | 395 | $absoluteUri, |
396 | 396 | $relativeUri, |
397 | 397 | &$odataEntry, |
398 | - ODataPropertyContent &$odataPropertyContent |
|
398 | + ODataPropertyContent & $odataPropertyContent |
|
399 | 399 | ) { |
400 | 400 | $resourceTypeKind = $resourceType->getResourceTypeKind(); |
401 | 401 | if ((null === $absoluteUri) == (ResourceTypeKind::ENTITY == $resourceTypeKind) |
@@ -518,8 +518,8 @@ discard block |
||
518 | 518 | */ |
519 | 519 | private function writePrimitiveValue( |
520 | 520 | &$primitiveValue, |
521 | - ODataProperty &$odataProperty, |
|
522 | - ResourceProperty &$resourceProperty |
|
521 | + ODataProperty & $odataProperty, |
|
522 | + ResourceProperty & $resourceProperty |
|
523 | 523 | ) { |
524 | 524 | if (is_object($primitiveValue)) { |
525 | 525 | //TODO ERROR: The property 'PropertyName' |
@@ -553,9 +553,9 @@ discard block |
||
553 | 553 | private function writeComplexValue( |
554 | 554 | &$complexValue, |
555 | 555 | $propertyName, |
556 | - ResourceType &$resourceType, |
|
556 | + ResourceType & $resourceType, |
|
557 | 557 | $relativeUri, |
558 | - ODataPropertyContent &$odataPropertyContent |
|
558 | + ODataPropertyContent & $odataPropertyContent |
|
559 | 559 | ) { |
560 | 560 | $odataProperty = new ODataProperty(); |
561 | 561 | $odataProperty->name = $propertyName; |
@@ -596,9 +596,9 @@ discard block |
||
596 | 596 | private function writeBagValue( |
597 | 597 | &$bagValue, |
598 | 598 | $propertyName, |
599 | - ResourceType &$resourceType, |
|
599 | + ResourceType & $resourceType, |
|
600 | 600 | $relativeUri, |
601 | - ODataPropertyContent &$odataPropertyContent |
|
601 | + ODataPropertyContent & $odataPropertyContent |
|
602 | 602 | ) { |
603 | 603 | assert(null == $bagValue || is_array($bagValue), 'Bag parameter must be null or array'); |
604 | 604 | $bagItemResourceTypeKind = $resourceType->getResourceTypeKind(); |
@@ -656,10 +656,10 @@ discard block |
||
656 | 656 | */ |
657 | 657 | private function writeMediaResourceMetadata( |
658 | 658 | $entryObject, |
659 | - ResourceType &$resourceType, |
|
659 | + ResourceType & $resourceType, |
|
660 | 660 | $title, |
661 | 661 | $relativeUri, |
662 | - ODataEntry &$odataEntry |
|
662 | + ODataEntry & $odataEntry |
|
663 | 663 | ) { |
664 | 664 | $streamProviderWrapper = $this->getService()->getStreamProviderWrapper(); |
665 | 665 | assert(null != $streamProviderWrapper, 'Retrieved stream provider must not be null'); |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | * @return string |
733 | 733 | */ |
734 | 734 | private function primitiveToString( |
735 | - ResourceType &$primitiveResourceType, |
|
735 | + ResourceType & $primitiveResourceType, |
|
736 | 736 | $primitiveValue |
737 | 737 | ) { |
738 | 738 | $type = $primitiveResourceType->getInstanceType(); |
@@ -771,9 +771,9 @@ discard block |
||
771 | 771 | private function complexObjectToContent( |
772 | 772 | &$complexValue, |
773 | 773 | $propertyName, |
774 | - ResourceType &$resourceType, |
|
774 | + ResourceType & $resourceType, |
|
775 | 775 | $relativeUri, |
776 | - ODataPropertyContent &$odataPropertyContent |
|
776 | + ODataPropertyContent & $odataPropertyContent |
|
777 | 777 | ) { |
778 | 778 | $count = count($this->complexTypeInstanceCollection); |
779 | 779 | for ($i = 0; $i < $count; ++$i) { |
@@ -816,9 +816,9 @@ discard block |
||
816 | 816 | */ |
817 | 817 | private function writeObjectPropertiesUnexpanded( |
818 | 818 | $customObject, |
819 | - ResourceType &$resourceType, |
|
819 | + ResourceType & $resourceType, |
|
820 | 820 | $relativeUri, |
821 | - ODataPropertyContent &$odataPropertyContent, |
|
821 | + ODataPropertyContent & $odataPropertyContent, |
|
822 | 822 | $resourceTypeKind, |
823 | 823 | $navigationProperties |
824 | 824 | ) { |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | if (28 < $resourceKind) { |
919 | 919 | return false; |
920 | 920 | } |
921 | - return 0 == ($resourceKind % 4); |
|
921 | + return 0 == ($resourceKind%4); |
|
922 | 922 | } |
923 | 923 | |
924 | 924 | |
@@ -936,9 +936,9 @@ discard block |
||
936 | 936 | */ |
937 | 937 | private function writeObjectPropertiesExpanded( |
938 | 938 | $customObject, |
939 | - ResourceType &$resourceType, |
|
939 | + ResourceType & $resourceType, |
|
940 | 940 | $relativeUri, |
941 | - ODataPropertyContent &$odataPropertyContent, |
|
941 | + ODataPropertyContent & $odataPropertyContent, |
|
942 | 942 | $projectionNodes, |
943 | 943 | $navigationProperties |
944 | 944 | ) { |
@@ -570,7 +570,8 @@ |
||
570 | 570 | ); |
571 | 571 | $this->writeProperties($content); |
572 | 572 | $this->xmlWriter->endElement(); |
573 | - } else { //probably just a primitive string |
|
573 | + } else { |
|
574 | +//probably just a primitive string |
|
574 | 575 | $this->xmlWriter->startElementNs( |
575 | 576 | ODataConstants::ODATA_NAMESPACE_PREFIX, |
576 | 577 | ODataConstants::COLLECTION_ELEMENT_NAME, |
@@ -28,7 +28,8 @@ |
||
28 | 28 | throw new UrlFormatException(Messages::urlMalformedUrl($url)); |
29 | 29 | } |
30 | 30 | } else { |
31 | - if (!preg_match(self::REL_URL_REGEXP, $url)) { //TODO: this matches EVERYTHING!!! what's the intent here? see #77 |
|
31 | + if (!preg_match(self::REL_URL_REGEXP, $url)) { |
|
32 | +//TODO: this matches EVERYTHING!!! what's the intent here? see #77 |
|
32 | 33 | throw new UrlFormatException(Messages::urlMalformedUrl($url)); |
33 | 34 | } |
34 | 35 | } |
@@ -397,7 +397,7 @@ |
||
397 | 397 | //TODO: why are these null? see #98 |
398 | 398 | null, // $orderby |
399 | 399 | null, // $top |
400 | - null, // $skip |
|
400 | + null, // $skip |
|
401 | 401 | $skipToken |
402 | 402 | ); |
403 | 403 |