Completed
Pull Request — master (#72)
by Christopher
03:32
created
src/POData/Providers/Metadata/SimpleMetadataProvider.php 2 patches
Indentation   +10 added lines, -10 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::RESOURCE_REFERENCE
418 418
         );
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
             $sourceResourceSet,
435 435
             $targeteResourceSet,
436 436
             $sourcePropertyName,
437
-			$sourcePropertyName,
437
+            $sourcePropertyName,
438 438
             ResourcePropertyKind::RESOURCESET_REFERENCE,
439 439
             ResourcePropertyKind::RESOURCESET_REFERENCE
440 440
         );
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
     ) {
629 629
         if (!($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE
630 630
             || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE)
631
-			&& !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE
631
+            && !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE
632 632
             || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE)
633 633
         ) {
634 634
             throw new InvalidOperationException(
@@ -642,25 +642,25 @@  discard block
 block discarded – undo
642 642
         $this->checkInstanceProperty($targetPropertyName, $targetResourceType);
643 643
         // check that property and resource name don't up and collide - would violate OData spec
644 644
         if (strtolower($sourcePropertyName) == strtolower($sourceResourceType->getName()) 
645
-			|| strtolower($targetResourceType) == strtolower($targetResourceType->getName()) 
646
-			) {
645
+            || strtolower($targetResourceType) == strtolower($targetResourceType->getName()) 
646
+            ) {
647 647
             throw new InvalidOperationException(
648 648
                 'Property name must be different from resource name.'
649 649
             );
650 650
         }
651 651
 
652
-		$sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType);
652
+        $sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType);
653 653
         $targetResourceProperty = new ResourceProperty($targetPropertyName, null, $targetResourcePropertyKind, $targetResourceType);
654 654
 
655 655
         $sourceResourceType->addProperty($sourceResourceProperty);
656
-		$targetResourceType->addProperty($targetResourceProperty);
656
+        $targetResourceType->addProperty($targetResourceProperty);
657 657
 
658 658
 
659 659
         //Customer_Orders_Orders, Order_Customer_Customers
660 660
         //(source type::name _ source property::name _ target set::name)
661 661
         $setKey = ResourceAssociationSet::keyName($sourceResourceType->getName(), $sourcePropertyName, $targetResourceType->getName(), $targetPropertyName);
662 662
         //$setKey = $resourceType->getName() . '_' . $name . '_' . $targetResourceType->getName();
663
-       $set = new ResourceAssociationSet(
663
+        $set = new ResourceAssociationSet(
664 664
             $setKey,
665 665
             new ResourceAssociationSetEnd($sourceResourceSet, $sourceResourceType, $sourceResourceProperty),
666 666
             new ResourceAssociationSetEnd($targetResourceSet, $targetResourceType, $targetResourceProperty)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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 addBidirectionalResourceSetResourceReferenceProperty(ResourceSet $sourceResourceSet,ResourceSet $targeteResourceSet, $sourcePropertyName,$targetPropertyName)
409
+    public function addBidirectionalResourceSetResourceReferenceProperty(ResourceSet $sourceResourceSet, ResourceSet $targeteResourceSet, $sourcePropertyName, $targetPropertyName)
410 410
     {
411 411
         $this->_addBidirectionalReferencePropertyInternal(
412 412
             $sourceResourceSet,
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
      * @param string       $sourcePropertyName              The name of the property to add to the sourceResourceType
429 429
      * @param string       $targetPropertyName              The name of the property to add to the targetResourceType
430 430
      */
431
-    public function addBidirectionalResourceSetResourceSetReferenceProperty(ResourceSet $sourceResourceSet,ResourceSet $targeteResourceSet, $sourcePropertyName,$targetPropertyName)
431
+    public function addBidirectionalResourceSetResourceSetReferenceProperty(ResourceSet $sourceResourceSet, ResourceSet $targeteResourceSet, $sourcePropertyName, $targetPropertyName)
432 432
     {
433 433
         $this->_addBidirectionalReferencePropertyInternal(
434 434
             $sourceResourceSet,
Please login to merge, or discard this patch.