| @@ -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. | 
| @@ -368,7 +368,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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) |