Completed
Pull Request — master (#72)
by Christopher
03:27
created
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.