@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | MimeTypes::MIME_APPLICATION_JSON_FULL_META, |
| 599 | 599 | MimeTypes::MIME_APPLICATION_JSON_NO_META, |
| 600 | 600 | MimeTypes::MIME_APPLICATION_JSON_MINIMAL_META, |
| 601 | - MimeTypes::MIME_APPLICATION_JSON_VERBOSE,]; |
|
| 601 | + MimeTypes::MIME_APPLICATION_JSON_VERBOSE, ]; |
|
| 602 | 602 | |
| 603 | 603 | // The Accept request-header field specifies media types which are acceptable for the response |
| 604 | 604 | |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | $requestAcceptText, |
| 674 | 674 | array_merge( |
| 675 | 675 | [MimeTypes::MIME_APPLICATION_XML, |
| 676 | - MimeTypes::MIME_TEXTXML,], |
|
| 676 | + MimeTypes::MIME_TEXTXML, ], |
|
| 677 | 677 | $baseMimeTypes |
| 678 | 678 | ) |
| 679 | 679 | ); |
@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | ResourceEntityType $resourceType, |
| 60 | 60 | ResourceProperty $resourceProperty = null, |
| 61 | 61 | ResourceEntityType $concreteType = null |
| 62 | - ) |
|
| 63 | - { |
|
| 62 | + ) { |
|
| 64 | 63 | if (null !== $resourceProperty |
| 65 | 64 | && (null === $resourceType->resolveProperty($resourceProperty->getName()) |
| 66 | 65 | || (($resourceProperty->getKind() != ResourcePropertyKind::RESOURCE_REFERENCE()) |
@@ -117,8 +116,7 @@ discard block |
||
| 117 | 116 | ResourceSet $resourceSet, |
| 118 | 117 | ResourceType $resourceType, |
| 119 | 118 | ResourceProperty $resourceProperty |
| 120 | - ) |
|
| 121 | - { |
|
| 119 | + ) { |
|
| 122 | 120 | return strcmp($resourceSet->getName(), $this->resourceSet->getName()) == 0 |
| 123 | 121 | && $this->resourceType->isAssignableFrom($resourceType) |
| 124 | 122 | && ((null === $resourceProperty && null === $this->resourceProperty) |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | ResourceEntityType $resourceType, |
| 67 | 67 | ?ResourceProperty $resourceProperty, |
| 68 | 68 | ?ResourceProperty $fromProperty |
| 69 | - ) |
|
| 70 | - { |
|
| 69 | + ) { |
|
| 71 | 70 | if (null === $resourceProperty && null === $fromProperty) { |
| 72 | 71 | throw new InvalidArgumentException( |
| 73 | 72 | Messages::resourceAssociationTypeEndBothPropertyCannotBeNull() |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | $name, |
| 55 | 55 | ResourceAssociationSetEnd $end1, |
| 56 | 56 | ResourceAssociationSetEnd $end2 |
| 57 | - ) |
|
| 58 | - { |
|
| 57 | + ) { |
|
| 59 | 58 | if (null === $end1->getResourceProperty() |
| 60 | 59 | && null === $end2->getResourceProperty() |
| 61 | 60 | ) { |
@@ -112,8 +111,7 @@ discard block |
||
| 112 | 111 | ResourceSet $resourceSet, |
| 113 | 112 | ResourceEntityType $resourceType, |
| 114 | 113 | ResourceProperty $resourceProperty |
| 115 | - ) |
|
| 116 | - { |
|
| 114 | + ) { |
|
| 117 | 115 | if ($this->end1->isBelongsTo($resourceSet, $resourceType, $resourceProperty)) { |
| 118 | 116 | return $this->end1; |
| 119 | 117 | } |
@@ -138,8 +136,7 @@ discard block |
||
| 138 | 136 | ResourceSet $resourceSet, |
| 139 | 137 | ResourceEntityType $resourceType, |
| 140 | 138 | ResourceProperty $resourceProperty |
| 141 | - ) |
|
| 142 | - { |
|
| 139 | + ) { |
|
| 143 | 140 | if ($this->end1->isBelongsTo($resourceSet, $resourceType, $resourceProperty)) { |
| 144 | 141 | return $this->end2; |
| 145 | 142 | } |
@@ -102,12 +102,12 @@ |
||
| 102 | 102 | $patt = ['/^(\'[0-9a-fA-F]{32}\')?$/', |
| 103 | 103 | '/^(\'[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\')?$/', |
| 104 | 104 | '/^\'\{?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}?\')?$/', |
| 105 | - '/^\'\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?\')?$/',]; |
|
| 105 | + '/^\'\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?\')?$/', ]; |
|
| 106 | 106 | } else { |
| 107 | 107 | $patt = ['/^([0-9a-fA-F]{32})?$/', |
| 108 | 108 | '/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})?$/', |
| 109 | 109 | '/^\{?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}?)?$/', |
| 110 | - '/^\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?)?$/',]; |
|
| 110 | + '/^\(?([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\)?)?$/', ]; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | foreach ($patt as $pattern) { |
@@ -51,8 +51,7 @@ discard block |
||
| 51 | 51 | $namespaceName, |
| 52 | 52 | ResourceAssociationTypeEnd $end1, |
| 53 | 53 | ResourceAssociationTypeEnd $end2 |
| 54 | - ) |
|
| 55 | - { |
|
| 54 | + ) { |
|
| 56 | 55 | $this->name = $name; |
| 57 | 56 | $this->fullName = null !== $namespaceName ? $namespaceName . '.' . $name : $name; |
| 58 | 57 | $this->end1 = $end1; |
@@ -110,8 +109,7 @@ discard block |
||
| 110 | 109 | public function getResourceAssociationTypeEnd( |
| 111 | 110 | ResourceEntityType $resourceType, |
| 112 | 111 | $resourceProperty |
| 113 | - ) |
|
| 114 | - { |
|
| 112 | + ) { |
|
| 115 | 113 | if ($this->end1->isBelongsTo($resourceType, $resourceProperty)) { |
| 116 | 114 | return $this->end1; |
| 117 | 115 | } |
@@ -133,8 +131,7 @@ discard block |
||
| 133 | 131 | public function getRelatedResourceAssociationSetEnd( |
| 134 | 132 | ResourceEntityType $resourceType, |
| 135 | 133 | $resourceProperty |
| 136 | - ) |
|
| 137 | - { |
|
| 134 | + ) { |
|
| 138 | 135 | if ($this->end1->isBelongsTo($resourceType, $resourceProperty)) { |
| 139 | 136 | return $this->end2; |
| 140 | 137 | } |
@@ -250,8 +250,7 @@ discard block |
||
| 250 | 250 | ResourceSet $sourceResourceSet, |
| 251 | 251 | ResourceEntityType $sourceResourceType, |
| 252 | 252 | ResourceProperty $targetResourceProperty |
| 253 | - ) |
|
| 254 | - { |
|
| 253 | + ) { |
|
| 255 | 254 | //e.g. |
| 256 | 255 | //ResourceSet => Representing 'Customers' entity set |
| 257 | 256 | //ResourceType => Representing'Customer' entity type |
@@ -306,8 +305,7 @@ discard block |
||
| 306 | 305 | $pluralName = null, |
| 307 | 306 | $isAbstract = false, |
| 308 | 307 | $baseType = null |
| 309 | - ) |
|
| 310 | - { |
|
| 308 | + ) { |
|
| 311 | 309 | $result = $this->createResourceType( |
| 312 | 310 | $refClass, |
| 313 | 311 | $name, |
@@ -339,8 +337,7 @@ discard block |
||
| 339 | 337 | $isAbstract = false, |
| 340 | 338 | $baseType = null, |
| 341 | 339 | $pluralName = null |
| 342 | - ) |
|
| 343 | - { |
|
| 340 | + ) { |
|
| 344 | 341 | if (array_key_exists($name, $this->resourceTypes)) { |
| 345 | 342 | throw new InvalidOperationException('Type with same name already added'); |
| 346 | 343 | } |
@@ -474,8 +471,7 @@ discard block |
||
| 474 | 471 | $isETagProperty = false, |
| 475 | 472 | $defaultValue = null, |
| 476 | 473 | $nullable = false |
| 477 | - ) |
|
| 478 | - { |
|
| 474 | + ) { |
|
| 479 | 475 | if ($isETagProperty && $isBag) { |
| 480 | 476 | throw new InvalidOperationException( |
| 481 | 477 | 'Only primitive property can be etag property, bag property cannot be etag property.' |
@@ -571,8 +567,7 @@ discard block |
||
| 571 | 567 | $isBag = false, |
| 572 | 568 | $defaultValue = null, |
| 573 | 569 | $nullable = false |
| 574 | - ) |
|
| 575 | - { |
|
| 570 | + ) { |
|
| 576 | 571 | $this->addPrimitivePropertyInternal( |
| 577 | 572 | $resourceType, |
| 578 | 573 | $name, |
@@ -603,8 +598,7 @@ discard block |
||
| 603 | 598 | EdmPrimitiveType $typeCode, |
| 604 | 599 | $defaultValue = null, |
| 605 | 600 | $nullable = false |
| 606 | - ) |
|
| 607 | - { |
|
| 601 | + ) { |
|
| 608 | 602 | $this->addPrimitivePropertyInternal( |
| 609 | 603 | $resourceType, |
| 610 | 604 | $name, |
@@ -638,8 +632,7 @@ discard block |
||
| 638 | 632 | $flip = false, |
| 639 | 633 | $many = false, |
| 640 | 634 | ResourceEntityType $concreteType = null |
| 641 | - ) |
|
| 642 | - { |
|
| 635 | + ) { |
|
| 643 | 636 | $this->addReferencePropertyInternal( |
| 644 | 637 | $resourceType, |
| 645 | 638 | $name, |
@@ -674,8 +667,7 @@ discard block |
||
| 674 | 667 | string $resourceMult, |
| 675 | 668 | $many = false, |
| 676 | 669 | ResourceEntityType $concreteType = null |
| 677 | - ) |
|
| 678 | - { |
|
| 670 | + ) { |
|
| 679 | 671 | $allowedMult = ['*', '1', '0..1']; |
| 680 | 672 | $backMultArray = ['*' => '*', '1' => '0..1', '0..1' => '1']; |
| 681 | 673 | $this->checkInstanceProperty($name, $sourceResourceType); |
@@ -751,8 +743,7 @@ discard block |
||
| 751 | 743 | $sourceProperty, |
| 752 | 744 | $targetProperty, |
| 753 | 745 | $nullable = false |
| 754 | - ) |
|
| 755 | - { |
|
| 746 | + ) { |
|
| 756 | 747 | $this->addReferencePropertyInternalBidirectional( |
| 757 | 748 | $sourceResourceType, |
| 758 | 749 | $targetResourceType, |
@@ -801,8 +792,7 @@ discard block |
||
| 801 | 792 | string $targetProperty, |
| 802 | 793 | string $sourceMultiplicity, |
| 803 | 794 | string $targetMultiplicity |
| 804 | - ) |
|
| 805 | - { |
|
| 795 | + ) { |
|
| 806 | 796 | $this->checkInstanceProperty($sourceProperty, $sourceResourceType); |
| 807 | 797 | $this->checkInstanceProperty($targetProperty, $targetResourceType); |
| 808 | 798 | |
@@ -904,8 +894,7 @@ discard block |
||
| 904 | 894 | ResourceSet $targetResourceSet, |
| 905 | 895 | ResourceEntityType $concreteType = null, |
| 906 | 896 | $single = false |
| 907 | - ) |
|
| 908 | - { |
|
| 897 | + ) { |
|
| 909 | 898 | $this->addReferencePropertyInternal( |
| 910 | 899 | $resourceType, |
| 911 | 900 | $name, |
@@ -933,8 +922,7 @@ discard block |
||
| 933 | 922 | ResourceEntityType $targetResourceType, |
| 934 | 923 | $sourceProperty, |
| 935 | 924 | $targetProperty |
| 936 | - ) |
|
| 937 | - { |
|
| 925 | + ) { |
|
| 938 | 926 | $this->addReferencePropertyInternalBidirectional( |
| 939 | 927 | $sourceResourceType, |
| 940 | 928 | $targetResourceType, |
@@ -973,8 +961,7 @@ discard block |
||
| 973 | 961 | ResourceEntityType $targetResourceType, |
| 974 | 962 | $sourceProperty, |
| 975 | 963 | $targetProperty |
| 976 | - ) |
|
| 977 | - { |
|
| 964 | + ) { |
|
| 978 | 965 | $this->addReferencePropertyInternalBidirectional( |
| 979 | 966 | $sourceResourceType, |
| 980 | 967 | $targetResourceType, |
@@ -1013,8 +1000,7 @@ discard block |
||
| 1013 | 1000 | $name, |
| 1014 | 1001 | ResourceComplexType $complexResourceType, |
| 1015 | 1002 | $isBag = false |
| 1016 | - ) |
|
| 1017 | - { |
|
| 1003 | + ) { |
|
| 1018 | 1004 | if ($targetResourceType->getResourceTypeKind() != ResourceTypeKind::ENTITY() |
| 1019 | 1005 | && $targetResourceType->getResourceTypeKind() != ResourceTypeKind::COMPLEX() |
| 1020 | 1006 | ) { |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | public function handleStartMetadataCount() |
| 98 | 98 | { |
| 99 | 99 | $this->enqueueEnd(function () { |
| 100 | - $this->oDataFeed->rowCount = (int)$this->popCharData(); |
|
| 100 | + $this->oDataFeed->rowCount = (int) $this->popCharData(); |
|
| 101 | 101 | }); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -138,8 +138,7 @@ discard block |
||
| 138 | 138 | public static function tryParseKeysFromKeyPredicate( |
| 139 | 139 | $keyPredicate, |
| 140 | 140 | KeyDescriptor &$keyDescriptor = null |
| 141 | - ) |
|
| 142 | - { |
|
| 141 | + ) { |
|
| 143 | 142 | $isKey = true; |
| 144 | 143 | $keyString = $keyPredicate; |
| 145 | 144 | return self::parseAndVerifyRawKeyPredicate($keyString, $isKey, $keyDescriptor); |
@@ -190,8 +189,7 @@ discard block |
||
| 190 | 189 | $allowNamedValues, |
| 191 | 190 | $allowNull, |
| 192 | 191 | &$keyDescriptor |
| 193 | - ) |
|
| 194 | - { |
|
| 192 | + ) { |
|
| 195 | 193 | $expressionLexer = new ExpressionLexer($keyPredicate); |
| 196 | 194 | $currentToken = $expressionLexer->getCurrentToken(); |
| 197 | 195 | |