@@ -892,6 +892,9 @@ |
||
| 892 | 892 | return [$odataPropertyContent, $navigationProperties]; |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | + /** |
|
| 896 | + * @param ResourcePropertyKind $resourceKind |
|
| 897 | + */ |
|
| 895 | 898 | public static function isMatchPrimitive($resourceKind) |
| 896 | 899 | { |
| 897 | 900 | if (16 > $resourceKind) { |
@@ -804,7 +804,7 @@ |
||
| 804 | 804 | |
| 805 | 805 | /** |
| 806 | 806 | * @param ResourceSet $resourceSet The entity set containing the entity to fetch |
| 807 | - * @param object $sourceEntityInstance The source entity instance |
|
| 807 | + * @param KeyDescriptor $sourceEntityInstance The source entity instance |
|
| 808 | 808 | * @param object $data The New data for the entity instance. |
| 809 | 809 | * |
| 810 | 810 | * returns object|null returns the newly created model if sucessful or null if model creation failed. |
@@ -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) |