Completed
Pull Request — master (#126)
by Christopher
03:36
created
src/POData/ObjectModel/ObjectModelSerializerBase.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -469,7 +469,7 @@
 block discarded – undo
469 469
                     ODataConstants::HTTPQUERY_STRING_ORDERBY,
470 470
                     ODataConstants::HTTPQUERY_STRING_INLINECOUNT,
471 471
                     ODataConstants::HTTPQUERY_STRING_SELECT
472
-                 ] as $queryOption) {
472
+                    ] as $queryOption) {
473 473
             $value = $this->getService()->getHost()->getQueryStringItem($queryOption);
474 474
             if (null !== $value) {
475 475
                 if (null !== $queryParameterString) {
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializer.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     ) {
Please login to merge, or discard this patch.