@@ -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. |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | ) { |
539 | 539 | if (!($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE |
540 | 540 | || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE) |
541 | - && !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE |
|
541 | + && !($sourceResourcePropertyKind == ResourcePropertyKind::RESOURCESET_REFERENCE |
|
542 | 542 | || $targetResourcePropertyKind == ResourcePropertyKind::RESOURCE_REFERENCE) |
543 | 543 | ) { |
544 | 544 | throw new InvalidOperationException( |
@@ -552,25 +552,25 @@ discard block |
||
552 | 552 | $this->checkInstanceProperty($targetPropertyName, $targetResourceType); |
553 | 553 | // check that property and resource name don't up and collide - would violate OData spec |
554 | 554 | if (strtolower($sourcePropertyName) == strtolower($sourceResourceType->getName()) |
555 | - || strtolower($targetResourceType) == strtolower($targetResourceType->getName()) |
|
556 | - ) { |
|
555 | + || strtolower($targetResourceType) == strtolower($targetResourceType->getName()) |
|
556 | + ) { |
|
557 | 557 | throw new InvalidOperationException( |
558 | 558 | 'Property name must be different from resource name.' |
559 | 559 | ); |
560 | 560 | } |
561 | 561 | |
562 | - $sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType); |
|
562 | + $sourceResourceProperty = new ResourceProperty($sourcePropertyName, null, $sourceResourcePropertyKind, $sourceResourceType); |
|
563 | 563 | $targetResourceProperty = new ResourceProperty($targetPropertyName, null, $targetResourcePropertyKind, $targetResourceType); |
564 | 564 | |
565 | 565 | $sourceResourceType->addProperty($sourceResourceProperty); |
566 | - $targetResourceType->addProperty($targetResourceProperty); |
|
566 | + $targetResourceType->addProperty($targetResourceProperty); |
|
567 | 567 | |
568 | 568 | |
569 | 569 | //Customer_Orders_Orders, Order_Customer_Customers |
570 | 570 | //(source type::name _ source property::name _ target set::name) |
571 | 571 | $setKey = ResourceAssociationSet::keyName($sourceResourceType->getName(), $sourcePropertyName, $targetResourceType->getName(), $targetPropertyName); |
572 | 572 | //$setKey = $resourceType->getName() . '_' . $name . '_' . $targetResourceType->getName(); |
573 | - $set = new ResourceAssociationSet( |
|
573 | + $set = new ResourceAssociationSet( |
|
574 | 574 | $setKey, |
575 | 575 | new ResourceAssociationSetEnd($sourceResourceSet, $sourceResourceType, $sourceResourceProperty), |
576 | 576 | new ResourceAssociationSetEnd($targetResourceSet, $targetResourceType, $targetResourceProperty) |