@@ -5,7 +5,6 @@ |
||
5 | 5 | use POData\Common\Messages; |
6 | 6 | use POData\Common\ODataException; |
7 | 7 | use POData\Providers\Metadata\ResourcePropertyKind; |
8 | -use POData\Providers\Metadata\ResourceSet; |
|
9 | 8 | use POData\Providers\Metadata\ResourceSetWrapper; |
10 | 9 | use POData\Providers\Metadata\ResourceType; |
11 | 10 | use POData\Providers\Metadata\ResourceTypeKind; |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use POData\Providers\Metadata\ResourcePropertyKind; |
12 | 12 | use POData\Providers\Metadata\ResourceType; |
13 | 13 | use POData\Providers\Metadata\ResourceTypeKind; |
14 | -use POData\Providers\Metadata\ResourceStreamInfo; |
|
15 | 14 | use POData\Providers\Metadata\Type\Binary; |
16 | 15 | use POData\Providers\Metadata\Type\Boolean; |
17 | 16 | use POData\Providers\Metadata\Type\DateTime; |
@@ -628,7 +628,7 @@ discard block |
||
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,24 +642,24 @@ discard block |
||
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::BidirectionalKeyName($sourceResourceType, $targetResourceType, $sourcePropertyName, $targetPropertyName); |
662 | - $set = new ResourceAssociationSet( |
|
662 | + $set = new ResourceAssociationSet( |
|
663 | 663 | $setKey, |
664 | 664 | new ResourceAssociationSetEnd($sourceResourceSet, $sourceResourceType, $sourceResourceProperty), |
665 | 665 | new ResourceAssociationSetEnd($targetResourceSet, $targetResourceType, $targetResourceProperty) |