Completed
Pull Request — master (#63)
by Christopher
08:25
created
src/POData/UriProcessor/UriProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     protected function executePut()
210 210
     {
211
-        return $this->executeBase(function ($uriProcessor, $segment) {
211
+        return $this->executeBase(function($uriProcessor, $segment) {
212 212
             $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod();
213 213
             $resourceSet = $segment->getTargetResourceSetWrapper();
214 214
             $keyDescriptor = $segment->getKeyDescriptor();
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     protected function executeDelete()
233 233
     {
234
-        return $this->executeBase(function ($uriProcessor, $segment) {
234
+        return $this->executeBase(function($uriProcessor, $segment) {
235 235
             $requestMethod = $uriProcessor->getService()->getOperationContext()->incomingRequest()->getMethod();
236 236
             $resourceSet = $segment->getTargetResourceSetWrapper();
237 237
             $keyDescriptor = $segment->getKeyDescriptor();
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
      *
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/Writers/Json/JsonWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,8 +158,8 @@
 block discarded – undo
158 158
 
159 159
             case 'Edm.DateTime':
160 160
                 $dateTime = new Carbon($value, new \DateTimeZone('UTC'));
161
-                $formattedDateTime = $dateTime->format('U') * 1000;
162
-                $this->_writeCore('/Date('.$formattedDateTime.')/', /* quotes */ true);
161
+                $formattedDateTime = $dateTime->format('U')*1000;
162
+                $this->_writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true);
163 163
                 break;
164 164
 
165 165
             case 'Edm.String':
Please login to merge, or discard this patch.
src/POData/Common/Messages/resourceAssociationType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public static function resourceAssociationTypeEndPropertyMustBeNullOrInstanceofResourceProperty($argumentName)
15 15
     {
16
-        return "The argument '".$argumentName."' must be either null or instance of 'ResourceProperty'.";
16
+        return "The argument '" . $argumentName . "' must be either null or instance of 'ResourceProperty'.";
17 17
     }
18 18
 
19 19
     /**
Please login to merge, or discard this patch.
src/POData/ObjectModel/IObjectSerialiser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      *
63 63
      * @return ODataPropertyContent
64 64
      */
65
-    public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType &$resourceType);
65
+    public function writeTopLevelComplexObject(&$complexValue, $propertyName, ResourceType & $resourceType);
66 66
 
67 67
     /**
68 68
      * Write top level bag resource.
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      *
77 77
      * @return ODataPropertyContent
78 78
      */
79
-    public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType &$resourceType);
79
+    public function writeTopLevelBagObject(&$BagValue, $propertyName, ResourceType & $resourceType);
80 80
 
81 81
     /**
82 82
      * Write top level primitive value.
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @return ODataPropertyContent
92 92
      */
93
-    public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty &$resourceProperty);
93
+    public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty & $resourceProperty);
94 94
 
95 95
     /**
96 96
      * Gets reference to the request submitted by client.
Please login to merge, or discard this patch.
src/POData/BaseService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
      */
666 666
     protected function compareETag(
667 667
         &$entryObject,
668
-        ResourceType &$resourceType,
668
+        ResourceType & $resourceType,
669 669
         &$needToSerializeResponse
670 670
     ) {
671 671
         $needToSerializeResponse = true;
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
             // but that is causing an issue in Linux env where the
717 717
             // firefix browser is unable to parse the ETag in this case.
718 718
             // Need to follow up PHP core devs for this.
719
-            $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX.$eTag.'"';
719
+            $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX . $eTag . '"';
720 720
             if (!is_null($ifMatch)) {
721 721
                 if (0 != strcmp($eTag, $ifMatch)) {
722 722
                     // Requested If-Match value does not match with current
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
             // but that is causing an issue in Linux env where the
740 740
             // firefix browser is unable to parse the ETag in this case.
741 741
             // Need to follow up PHP core devs for this.
742
-            $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX.$eTag.'"';
742
+            $eTag = ODataConstants::HTTP_WEAK_ETAG_PREFIX . $eTag . '"';
743 743
         }
744 744
 
745 745
         return $eTag;
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
      *                     for use in a URI) there are etag properties, NULL if
759 759
      *                     there is no etag property
760 760
      */
761
-    protected function getETagForEntry(&$entryObject, ResourceType &$resourceType)
761
+    protected function getETagForEntry(&$entryObject, ResourceType & $resourceType)
762 762
     {
763 763
         $eTag = null;
764 764
         $comma = null;
@@ -777,8 +777,8 @@  discard block
 block discarded – undo
777 777
                 );
778 778
             }
779 779
 
780
-            $eTagBase = $eTag.$comma;
781
-            $eTag = $eTagBase.((null == $value) ? 'null' : $type->convertToOData($value));
780
+            $eTagBase = $eTag . $comma;
781
+            $eTag = $eTagBase . ((null == $value) ? 'null' : $type->convertToOData($value));
782 782
 
783 783
             $comma = ',';
784 784
         }
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/UriProcessor/XML2Array.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
                     throw new \Exception();
36 36
                 }
37 37
             } catch (\Exception $ex) {
38
-                throw new \Exception('[XML2Array] Error parsing the XML string.'.PHP_EOL.$ex->getMessage());
38
+                throw new \Exception('[XML2Array] Error parsing the XML string.' . PHP_EOL . $ex->getMessage());
39 39
             }
40 40
         } elseif (is_object($input_xml)) {
41 41
             if (get_class($input_xml) != 'DOMDocument') {
Please login to merge, or discard this patch.
POData/UriProcessor/ResourcePathProcessor/SegmentParser/SegmentParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                 if ($hasPredicate) {
316 316
                     $this->_assertion(!$current->isSingleResult());
317 317
                     $keyDescriptor = $this->_createKeyDescriptor(
318
-                        $identifier.'('.$keyPredicate.')',
318
+                        $identifier . '(' . $keyPredicate . ')',
319 319
                         $projectedProperty->getResourceType(),
320 320
                         $keyPredicate
321 321
                     );
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         $descriptor->setTargetKind(TargetKind::RESOURCE());
395 395
         if ($keyPredicate !== null) {
396 396
             $keyDescriptor = $this->_createKeyDescriptor(
397
-                $segmentIdentifier.'('.$keyPredicate.')',
397
+                $segmentIdentifier . '(' . $keyPredicate . ')',
398 398
                 $resourceSetWrapper->getResourceType(),
399 399
                 $keyPredicate
400 400
             );
Please login to merge, or discard this patch.