Passed
Pull Request — master (#130)
by Alex
04:37
created
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,9 +191,9 @@  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
-        ResourceType &$resourceType
196
+        ResourceType & $resourceType
197 197
     ) {
198 198
         $propertyContent = new ODataPropertyContent();
199 199
         $this->writeComplexValue(
@@ -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)
@@ -519,8 +519,8 @@  discard block
 block discarded – undo
519 519
      */
520 520
     private function writePrimitiveValue(
521 521
         &$primitiveValue,
522
-        ODataProperty &$odataProperty,
523
-        ResourceProperty &$resourceProperty
522
+        ODataProperty & $odataProperty,
523
+        ResourceProperty & $resourceProperty
524 524
     ) {
525 525
         if (is_object($primitiveValue)) {
526 526
             //TODO ERROR: The property 'PropertyName'
@@ -554,9 +554,9 @@  discard block
 block discarded – undo
554 554
     private function writeComplexValue(
555 555
         &$complexValue,
556 556
         $propertyName,
557
-        ResourceType &$resourceType,
557
+        ResourceType & $resourceType,
558 558
         $relativeUri,
559
-        ODataPropertyContent &$odataPropertyContent
559
+        ODataPropertyContent & $odataPropertyContent
560 560
     ) {
561 561
         $odataProperty = new ODataProperty();
562 562
         $odataProperty->name = $propertyName;
@@ -597,9 +597,9 @@  discard block
 block discarded – undo
597 597
     private function writeBagValue(
598 598
         &$bagValue,
599 599
         $propertyName,
600
-        ResourceType &$resourceType,
600
+        ResourceType & $resourceType,
601 601
         $relativeUri,
602
-        ODataPropertyContent &$odataPropertyContent
602
+        ODataPropertyContent & $odataPropertyContent
603 603
     ) {
604 604
         assert(null == $bagValue || is_array($bagValue), 'Bag parameter must be null or array');
605 605
         $bagItemResourceTypeKind = $resourceType->getResourceTypeKind();
@@ -657,10 +657,10 @@  discard block
 block discarded – undo
657 657
      */
658 658
     private function writeMediaResourceMetadata(
659 659
         $entryObject,
660
-        ResourceType &$resourceType,
660
+        ResourceType & $resourceType,
661 661
         $title,
662 662
         $relativeUri,
663
-        ODataEntry &$odataEntry
663
+        ODataEntry & $odataEntry
664 664
     ) {
665 665
         $streamProviderWrapper = $this->getService()->getStreamProviderWrapper();
666 666
         assert(null != $streamProviderWrapper, 'Retrieved stream provider must not be null');
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
      * @return string
734 734
      */
735 735
     private function primitiveToString(
736
-        ResourceType &$primitiveResourceType,
736
+        ResourceType & $primitiveResourceType,
737 737
         $primitiveValue
738 738
     ) {
739 739
         $type = $primitiveResourceType->getInstanceType();
@@ -772,9 +772,9 @@  discard block
 block discarded – undo
772 772
     private function complexObjectToContent(
773 773
         &$complexValue,
774 774
         $propertyName,
775
-        ResourceType &$resourceType,
775
+        ResourceType & $resourceType,
776 776
         $relativeUri,
777
-        ODataPropertyContent &$odataPropertyContent
777
+        ODataPropertyContent & $odataPropertyContent
778 778
     ) {
779 779
         $count = count($this->complexTypeInstanceCollection);
780 780
         for ($i = 0; $i < $count; ++$i) {
@@ -817,9 +817,9 @@  discard block
 block discarded – undo
817 817
      */
818 818
     private function writeObjectPropertiesUnexpanded(
819 819
         $customObject,
820
-        ResourceType &$resourceType,
820
+        ResourceType & $resourceType,
821 821
         $relativeUri,
822
-        ODataPropertyContent &$odataPropertyContent,
822
+        ODataPropertyContent & $odataPropertyContent,
823 823
         $resourceTypeKind,
824 824
         $navigationProperties
825 825
     ) {
@@ -937,9 +937,9 @@  discard block
 block discarded – undo
937 937
      */
938 938
     private function writeObjectPropertiesExpanded(
939 939
         $customObject,
940
-        ResourceType &$resourceType,
940
+        ResourceType & $resourceType,
941 941
         $relativeUri,
942
-        ODataPropertyContent &$odataPropertyContent,
942
+        ODataPropertyContent & $odataPropertyContent,
943 943
         $projectionNodes,
944 944
         $navigationProperties
945 945
     ) {
Please login to merge, or discard this patch.
src/POData/Providers/ProvidersQueryWrapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -421,8 +421,8 @@
 block discarded – undo
421 421
      */
422 422
     private function validateEntityInstance(
423 423
         $entityInstance,
424
-        ResourceSet &$resourceSet,
425
-        KeyDescriptor &$keyDescriptor,
424
+        ResourceSet & $resourceSet,
425
+        KeyDescriptor & $keyDescriptor,
426 426
         $methodName
427 427
     ) {
428 428
         if (null === $entityInstance) {
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/SkipTokenParser/SkipTokenInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      * @param array<array<IType>> $orderByValuesInSkipToken Collection of values in the skiptoken corresponds
37 37
      *                                                      to the orderby path segments
38 38
      */
39
-    public function __construct(OrderByInfo &$orderByInfo, $orderByValuesInSkipToken)
39
+    public function __construct(OrderByInfo & $orderByInfo, $orderByValuesInSkipToken)
40 40
     {
41 41
         $this->orderByInfo = $orderByInfo;
42 42
         $this->orderByValuesInSkipToken = $orderByValuesInSkipToken;
Please login to merge, or discard this patch.
src/POData/UriProcessor/RequestDescription.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
      *
667 667
      * @param InternalOrderByInfo &$internalOrderByInfo The sorting information
668 668
      */
669
-    public function setInternalOrderByInfo(InternalOrderByInfo &$internalOrderByInfo)
669
+    public function setInternalOrderByInfo(InternalOrderByInfo & $internalOrderByInfo)
670 670
     {
671 671
         $this->internalOrderByInfo = $internalOrderByInfo;
672 672
     }
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
      * @param InternalSkipTokenInfo &$internalSkipTokenInfo The paging information
688 688
      */
689 689
     public function setInternalSkipTokenInfo(
690
-        InternalSkipTokenInfo &$internalSkipTokenInfo
690
+        InternalSkipTokenInfo & $internalSkipTokenInfo
691 691
     ) {
692 692
         $this->internalSkipTokenInfo = $internalSkipTokenInfo;
693 693
     }
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
      *
714 714
      * @param RootProjectionNode &$rootProjectionNode Root of the projection tree
715 715
      */
716
-    public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode)
716
+    public function setRootProjectionNode(RootProjectionNode & $rootProjectionNode)
717 717
     {
718 718
         $this->rootProjectionNode = $rootProjectionNode;
719 719
     }
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/POData/OperationContext/ServiceHost.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                     );
224 224
                 }
225 225
 
226
-                $serviceUri = $requestUriScheme .'://' . $this->getAbsoluteRequestUri()->getHost();
226
+                $serviceUri = $requestUriScheme . '://' . $this->getAbsoluteRequestUri()->getHost();
227 227
 
228 228
                 if (($requestUriScheme == 'http' && $requestUriPort != '80') ||
229 229
                     ($requestUriScheme == 'https' && $requestUriPort != '443')
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
             $this->getOperationContext()->outgoingResponse()->setContentLength($value);
514 514
         } else {
515 515
             throw ODataException::notAcceptableError(
516
-                'ContentLength: '.$value.' is invalid'
516
+                'ContentLength: ' . $value . ' is invalid'
517 517
             );
518 518
         }
519 519
     }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
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);
Please login to merge, or discard this patch.
UriProcessor/QueryProcessor/SkipTokenParser/InternalSkipTokenInfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/POData/Common/Messages/resourceProperty.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/POData/Common/Messages/request.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.