Completed
Pull Request — master (#72)
by Christopher
03:27
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/UriProcessor/QueryProcessor/OrderByParser/OrderByLeafNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
 
103 103
         $a = $this->_isAscending ? 1 : -1;
104 104
 
105
-        $retVal = function ($object1, $object2) use ($ancestors, $a) {
105
+        $retVal = function($object1, $object2) use ($ancestors, $a) {
106 106
             $accessor1 = $object1;
107 107
             $accessor2 = $object2;
108 108
             $flag1 = is_null($accessor1);
Please login to merge, or discard this patch.
src/POData/UriProcessor/QueryProcessor/OrderByParser/OrderByParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@
 block discarded – undo
400 400
             $this->_topLevelComparisonFunction = $this->_comparisonFunctions[0];
401 401
         } else {
402 402
             $funcList = $this->_comparisonFunctions;
403
-            $this->_topLevelComparisonFunction = function ($object1, $object2) use ($funcList) {
403
+            $this->_topLevelComparisonFunction = function($object1, $object2) use ($funcList) {
404 404
                 $ret = 0;
405 405
                 foreach ($funcList as $f) {
406 406
                     $ret = $f($object1, $object2);
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 = null);
93
+    public function writeTopLevelPrimitive(&$primitiveValue, ResourceProperty & $resourceProperty = null);
94 94
 
95 95
     /**
96 96
      * Gets reference to the request submitted by client.
Please login to merge, or discard this patch.
src/POData/ObjectModel/ObjectModelSerializer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
      */
509 509
     private function _writePrimitiveValue(
510 510
         &$primitiveValue,
511
-        ODataProperty &$odataProperty,
512
-        ResourceProperty &$resourceProperty = null
511
+        ODataProperty & $odataProperty,
512
+        ResourceProperty & $resourceProperty = null
513 513
     ) {
514 514
         if (is_object($primitiveValue)) {
515 515
             //TODO ERROR: The property 'PropertyName'
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
         if (28 < $resourceKind) {
897 897
             return false;
898 898
         }
899
-        return 0 == ($resourceKind % 4);
899
+        return 0 == ($resourceKind%4);
900 900
     }
901 901
 
902 902
 
Please login to merge, or discard this patch.
src/POData/Providers/Metadata/SimpleMetadataProvider.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
             $sourceResourceSet,
369 369
             $targeteResourceSet,
370 370
             $sourcePropertyName,
371
-			$sourcePropertyName,
371
+            $sourcePropertyName,
372 372
             ResourcePropertyKind::RESOURCE_REFERENCE,
373 373
             ResourcePropertyKind::RESOURCE_REFERENCE
374 374
         );
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
             $sourceResourceSet,
391 391
             $targeteResourceSet,
392 392
             $sourcePropertyName,
393
-			$sourcePropertyName,
393
+            $sourcePropertyName,
394 394
             ResourcePropertyKind::RESOURCE_REFERENCE,
395 395
             ResourcePropertyKind::RESOURCESET_REFERENCE
396 396
         );
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
             $sourceResourceSet,
413 413
             $targeteResourceSet,
414 414
             $sourcePropertyName,
415
-			$sourcePropertyName,
415
+            $sourcePropertyName,
416 416
             ResourcePropertyKind::RESOURCESET_REFERENCE,
417 417
             ResourcePropertyKind::RESOURCESET_REFERENCE
418 418
         );
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
     ) {
607 607
         if (!($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE
608 608
             || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE)
609
-			&& !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE
609
+            && !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE
610 610
             || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE)
611 611
         ) {
612 612
             throw new InvalidOperationException(
@@ -620,25 +620,25 @@  discard block
 block discarded – undo
620 620
         $this->checkInstanceProperty($targetPropertyName, $targetResourceType);
621 621
         // check that property and resource name don't up and collide - would violate OData spec
622 622
         if (strtolower($sourcePropertyName) == strtolower($sourceResourceType->getName()) 
623
-			|| strtolower($targetResourceType) == strtolower($targetResourceType->getName()) 
624
-			) {
623
+            || strtolower($targetResourceType) == strtolower($targetResourceType->getName()) 
624
+            ) {
625 625
             throw new InvalidOperationException(
626 626
                 'Property name must be different from resource name.'
627 627
             );
628 628
         }
629 629
 
630
-		$sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType);
630
+        $sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType);
631 631
         $targetResourceProperty = new ResourceProperty($targetPropertyName, null, $targetResourcePropertyKind, $targetResourceType);
632 632
 
633 633
         $sourceResourceType->addProperty($sourceResourceProperty);
634
-		$targetResourceType->addProperty($targetResourceProperty);
634
+        $targetResourceType->addProperty($targetResourceProperty);
635 635
 
636 636
 
637 637
         //Customer_Orders_Orders, Order_Customer_Customers
638 638
         //(source type::name _ source property::name _ target set::name)
639 639
         $setKey = ResourceAssociationSet::keyName($sourceResourceType->getName(), $sourcePropertyName, $targetResourceType->getName(), $targetPropertyName);
640 640
         //$setKey = $resourceType->getName() . '_' . $name . '_' . $targetResourceType->getName();
641
-       $set = new ResourceAssociationSet(
641
+        $set = new ResourceAssociationSet(
642 642
             $setKey,
643 643
             new ResourceAssociationSetEnd($sourceResourceSet, $sourceResourceType, $sourceResourceProperty),
644 644
             new ResourceAssociationSetEnd($targetResourceSet, $targetResourceType, $targetResourceProperty)
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
      * @param string       $sourcePropertyName              The name of the property to add to the sourceResourceType
363 363
      * @param string       $targetPropertyName              The name of the property to add to the targetResourceType
364 364
      */
365
-    public function addBidirectionalResourceResourceReferenceProperty(ResourceSet $sourceResourceSet,ResourceSet $targeteResourceSet, $sourcePropertyName,$targetPropertyName)
365
+    public function addBidirectionalResourceResourceReferenceProperty(ResourceSet $sourceResourceSet, ResourceSet $targeteResourceSet, $sourcePropertyName, $targetPropertyName)
366 366
     {
367 367
         $this->_addBidirectionalReferencePropertyInternal(
368 368
             $sourceResourceSet,
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      * @param string       $sourcePropertyName              The name of the property to add to the sourceResourceType
385 385
      * @param string       $targetPropertyName              The name of the property to add to the targetResourceType
386 386
      */
387
-    public function addBidirectionalResourceResourceSetReferenceProperty(ResourceSet $sourceResourceSet,ResourceSet $targeteResourceSet, $sourcePropertyName,$targetPropertyName)
387
+    public function addBidirectionalResourceResourceSetReferenceProperty(ResourceSet $sourceResourceSet, ResourceSet $targeteResourceSet, $sourcePropertyName, $targetPropertyName)
388 388
     {
389 389
         $this->_addBidirectionalReferencePropertyInternal(
390 390
             $sourceResourceSet,
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      * @param string       $sourcePropertyName              The name of the property to add to the sourceResourceType
407 407
      * @param string       $targetPropertyName              The name of the property to add to the targetResourceType
408 408
      */
409
-    public function addBidirectionalResourceSetResourceSetReferenceProperty(ResourceSet $sourceResourceSet,ResourceSet $targeteResourceSet, $sourcePropertyName,$targetPropertyName)
409
+    public function addBidirectionalResourceSetResourceSetReferenceProperty(ResourceSet $sourceResourceSet, ResourceSet $targeteResourceSet, $sourcePropertyName, $targetPropertyName)
410 410
     {
411 411
         $this->_addBidirectionalReferencePropertyInternal(
412 412
             $sourceResourceSet,
Please login to merge, or discard this patch.