Test Setup Failed
Pull Request — master (#136)
by Alex
03:53
created
src/POData/Common/Messages/resourceProperty.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public static function resourcePropertyInvalidKindParameter($argumentName)
15 15
     {
16 16
         return 'The argument \''.$argumentName.'\' is not a valid ResourcePropertyKind enum value or'
17
-               .' valid combination of ResourcePropertyKind enum values';
17
+                .' valid combination of ResourcePropertyKind enum values';
18 18
     }
19 19
 
20 20
     /**
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
         $resourceTypeArgName
31 31
     ) {
32 32
         return 'The \''.$resourcePropertyKindArgName.'\' parameter does not match with the type of the resource'
33
-               .' type in parameter \''.$resourceTypeArgName.'\'';
33
+                .' type in parameter \''.$resourceTypeArgName.'\'';
34 34
     }
35 35
 }
Please login to merge, or discard this 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/skipTokenParser.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $expectedCount
45 45
     ) {
46 46
         return 'The number of keys \'' . $skipTokenValuesCount . '\' in skip token with value \'' . $skipToken .
47
-               '\' did not match the number of ordering constraints \'' . $expectedCount . '\' for the resource type.';
47
+                '\' did not match the number of ordering constraints \'' . $expectedCount . '\' for the resource type.';
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.
src/POData/Common/Messages/request.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public static function requestVersionTooLow($requestedVersion, $requiredVersion)
18 18
     {
19 19
         return 'Request version \''.$requestedVersion.'\' is not supported for the request payload. The only'
20
-               .' supported version is \''.$requiredVersion.'\'.';
20
+                .' supported version is \''.$requiredVersion.'\'.';
21 21
     }
22 22
 
23 23
     /**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public static function requestVersionIsBiggerThanProtocolVersion($requiredVersion, $configuredVersion)
33 33
     {
34 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.'.';
35
+                .' MaxProtocolVersion of the data service is set to '.$configuredVersion.'.';
36 36
     }
37 37
 
38 38
     /**
@@ -65,6 +65,6 @@  discard block
 block discarded – undo
65 65
         $availableVersions
66 66
     ) {
67 67
         return 'The version value '.$requestedVersion.' in the header '.$requestHeaderName.' is not'
68
-               .' supported, available versions are '.$availableVersions;
68
+                .' supported, available versions are '.$availableVersions;
69 69
     }
70 70
 }
Please login to merge, or discard this 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/Common/Messages/orderByInfo.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public static function orderByParserPropertyNotFound($resourceTypeName, $propertyName)
51 51
     {
52 52
         return 'Error in the \'orderby\' clause. Type ' . $resourceTypeName
53
-               . ' does not have a property named \'' . $propertyName . '\'.';
53
+                . ' does not have a property named \'' . $propertyName . '\'.';
54 54
     }
55 55
 
56 56
     /**
@@ -179,6 +179,6 @@  discard block
 block discarded – undo
179 179
     public static function orderByParserFailedToAccessOrInitializeProperty($propertyName, $parentObjectName)
180 180
     {
181 181
         return 'OrderBy parser failed to access or initialize the property ' . $propertyName .
182
-               ' of ' . $parentObjectName;
182
+                ' of ' . $parentObjectName;
183 183
     }
184 184
 }
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/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)');
@@ -393,11 +393,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     ) {
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.