Test Setup Failed
Pull Request — master (#138)
by Alex
03:54
created
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.
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.
src/POData/UriProcessor/SegmentStack.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializerBase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
629 629
         &$parentPathSegments,
630 630
         &$selectionPaths,
631 631
         &$expansionPaths,
632
-        ExpandedProjectionNode &$expandedProjectionNode,
632
+        ExpandedProjectionNode & $expandedProjectionNode,
633 633
         &$foundSelections,
634 634
         &$foundExpansions
635 635
     ) {
Please login to merge, or discard this patch.
src/POData/UriProcessor/RequestExpander.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
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
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 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.
src/POData/ObjectModel/ObjectModelSerializer.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return ODataFeed
73 73
      */
74
-    public function writeTopLevelElements(QueryResult &$entryObjects)
74
+    public function writeTopLevelElements(QueryResult & $entryObjects)
75 75
     {
76 76
         assert(is_array($entryObjects->results), '!is_array($entryObjects->results)');
77 77
         $requestTargetSource = $this->getRequest()->getTargetSource();
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
      * @return ODataPropertyContent
188 188
      */
189 189
     public function writeTopLevelComplexObject(
190
-        QueryResult &$complexValue,
190
+        QueryResult & $complexValue,
191 191
         $propertyName,
192
-        ResourceType &$resourceType
192
+        ResourceType & $resourceType
193 193
     ) {
194 194
         $propertyContent = new ODataPropertyContent();
195 195
         $this->writeComplexValue(
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
      * @return ODataPropertyContent
213 213
      */
214 214
     public function writeTopLevelBagObject(
215
-        QueryResult &$bagValue,
215
+        QueryResult & $bagValue,
216 216
         $propertyName,
217
-        ResourceType &$resourceType
217
+        ResourceType & $resourceType
218 218
     ) {
219 219
         $propertyContent = new ODataPropertyContent();
220 220
         $this->writeBagValue(
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
      * @return ODataPropertyContent
238 238
      */
239 239
     public function writeTopLevelPrimitive(
240
-        QueryResult &$primitiveValue,
241
-        ResourceProperty &$resourceProperty = null
240
+        QueryResult & $primitiveValue,
241
+        ResourceProperty & $resourceProperty = null
242 242
     ) {
243 243
         assert(null != $resourceProperty, 'Resource property must not be null');
244 244
         $propertyContent = new ODataPropertyContent();
@@ -323,11 +323,11 @@  discard block
 block discarded – undo
323 323
      */
324 324
     private function writeFeedElements(
325 325
         &$entryObjects,
326
-        ResourceType &$resourceType,
326
+        ResourceType & $resourceType,
327 327
         $title,
328 328
         $absoluteUri,
329 329
         $relativeUri,
330
-        ODataFeed &$feed,
330
+        ODataFeed & $feed,
331 331
         $needLink = false
332 332
     ) {
333 333
         assert(is_array($entryObjects), '!_writeFeedElements::is_array($entryObjects)');
@@ -386,11 +386,11 @@  discard block
 block discarded – undo
386 386
      */
387 387
     private function writeObjectProperties(
388 388
         $customObject,
389
-        ResourceType &$resourceType,
389
+        ResourceType & $resourceType,
390 390
         $absoluteUri,
391 391
         $relativeUri,
392 392
         &$odataEntry,
393
-        ODataPropertyContent &$odataPropertyContent
393
+        ODataPropertyContent & $odataPropertyContent
394 394
     ) {
395 395
         $resourceTypeKind = $resourceType->getResourceTypeKind();
396 396
         if ((null === $absoluteUri) == (ResourceTypeKind::ENTITY() == $resourceTypeKind)) {
@@ -514,8 +514,8 @@  discard block
 block discarded – undo
514 514
      */
515 515
     private function writePrimitiveValue(
516 516
         &$primitiveValue,
517
-        ODataProperty &$odataProperty,
518
-        ResourceProperty &$resourceProperty
517
+        ODataProperty & $odataProperty,
518
+        ResourceProperty & $resourceProperty
519 519
     ) {
520 520
         if (is_object($primitiveValue)) {
521 521
             //TODO ERROR: The property 'PropertyName'
@@ -551,9 +551,9 @@  discard block
 block discarded – undo
551 551
     private function writeComplexValue(
552 552
         &$complexValue,
553 553
         $propertyName,
554
-        ResourceType &$resourceType,
554
+        ResourceType & $resourceType,
555 555
         $relativeUri,
556
-        ODataPropertyContent &$odataPropertyContent
556
+        ODataPropertyContent & $odataPropertyContent
557 557
     ) {
558 558
         $odataProperty = new ODataProperty();
559 559
         $odataProperty->name = $propertyName;
@@ -594,9 +594,9 @@  discard block
 block discarded – undo
594 594
     private function writeBagValue(
595 595
         &$bagValue,
596 596
         $propertyName,
597
-        ResourceType &$resourceType,
597
+        ResourceType & $resourceType,
598 598
         $relativeUri,
599
-        ODataPropertyContent &$odataPropertyContent
599
+        ODataPropertyContent & $odataPropertyContent
600 600
     ) {
601 601
         assert(null == $bagValue || is_array($bagValue), 'Bag parameter must be null or array');
602 602
         $bagItemResourceTypeKind = $resourceType->getResourceTypeKind();
@@ -654,10 +654,10 @@  discard block
 block discarded – undo
654 654
      */
655 655
     private function writeMediaResourceMetadata(
656 656
         $entryObject,
657
-        ResourceType &$resourceType,
657
+        ResourceType & $resourceType,
658 658
         $title,
659 659
         $relativeUri,
660
-        ODataEntry &$odataEntry
660
+        ODataEntry & $odataEntry
661 661
     ) {
662 662
         $streamProviderWrapper = $this->getService()->getStreamProviderWrapper();
663 663
         assert(null != $streamProviderWrapper, 'Retrieved stream provider must not be null');
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
      * @return string
731 731
      */
732 732
     private function primitiveToString(
733
-        ResourceType &$primitiveResourceType,
733
+        ResourceType & $primitiveResourceType,
734 734
         $primitiveValue
735 735
     ) {
736 736
         $type = $primitiveResourceType->getInstanceType();
@@ -770,9 +770,9 @@  discard block
 block discarded – undo
770 770
     private function complexObjectToContent(
771 771
         &$complexValue,
772 772
         $propertyName,
773
-        ResourceType &$resourceType,
773
+        ResourceType & $resourceType,
774 774
         $relativeUri,
775
-        ODataPropertyContent &$odataPropertyContent
775
+        ODataPropertyContent & $odataPropertyContent
776 776
     ) {
777 777
         $count = count($this->complexTypeInstanceCollection);
778 778
         for ($i = 0; $i < $count; ++$i) {
@@ -815,9 +815,9 @@  discard block
 block discarded – undo
815 815
      */
816 816
     private function writeObjectPropertiesUnexpanded(
817 817
         $customObject,
818
-        ResourceType &$resourceType,
818
+        ResourceType & $resourceType,
819 819
         $relativeUri,
820
-        ODataPropertyContent &$odataPropertyContent,
820
+        ODataPropertyContent & $odataPropertyContent,
821 821
         ResourceTypeKind $resourceTypeKind,
822 822
         $navigationProperties
823 823
     ) {
@@ -935,9 +935,9 @@  discard block
 block discarded – undo
935 935
      */
936 936
     private function writeObjectPropertiesExpanded(
937 937
         $customObject,
938
-        ResourceType &$resourceType,
938
+        ResourceType & $resourceType,
939 939
         $relativeUri,
940
-        ODataPropertyContent &$odataPropertyContent,
940
+        ODataPropertyContent & $odataPropertyContent,
941 941
         $projectionNodes,
942 942
         $navigationProperties
943 943
     ) {
Please login to merge, or discard this patch.