Passed
Push — master ( 3e052f...482722 )
by Christopher
03:45
created
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
      *
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/OperationContext/Web/IncomingRequest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/POData/Writers/Json/JsonWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,8 +157,8 @@
 block discarded – undo
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':
Please login to merge, or discard this patch.
src/POData/UriProcessor/UriProcessorNew.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -411,7 +411,7 @@
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
QueryProcessor/ExpressionParser/Expressions/BinaryExpression.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializer.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -430,7 +430,8 @@
 block discarded – undo
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,
Please login to merge, or discard this 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.
src/POData/Writers/Atom/AtomODataWriter.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -570,7 +570,8 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/POData/Common/Url.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/POData/UriProcessor/UriProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.