@@ -25,8 +25,7 @@ |
||
25 | 25 | public static function skipTokenInfoBothOrderByPathAndOrderByValuesShouldBeSetOrNotSet( |
26 | 26 | $orderByPathsVarName, |
27 | 27 | $orderByValuesVarName |
28 | - ) |
|
29 | - { |
|
28 | + ) { |
|
30 | 29 | return 'Either both the arguments ' . $orderByPathsVarName . ' and ' . $orderByValuesVarName . ' should be' |
31 | 30 | . ' null or not-null'; |
32 | 31 | } |
@@ -22,8 +22,7 @@ |
||
22 | 22 | public static function metadataResourceTypeSetNamedStreamsOnDerivedEntityTypesNotSupported( |
23 | 23 | $entitySetName, |
24 | 24 | $derivedTypeName |
25 | - ) |
|
26 | - { |
|
25 | + ) { |
|
27 | 26 | return 'Named streams are not supported on derived entity types. Entity Set \'' . $entitySetName |
28 | 27 | . '\' has an instance of type \'' . $derivedTypeName . '\', which is a derived entity type and has' |
29 | 28 | . ' named streams. Please remove all named streams from type \'' . $derivedTypeName . '\'.'; |
@@ -39,8 +39,7 @@ |
||
39 | 39 | $resourceSet1Name, |
40 | 40 | $resourceSet2Name, |
41 | 41 | $entitySetName |
42 | - ) |
|
43 | - { |
|
42 | + ) { |
|
44 | 43 | return 'ResourceAssociationSets \'' . $resourceSet1Name . '\' and \'' . $resourceSet2Name . '\' have a' |
45 | 44 | . ' ResourceAssociationSetEnd referring to the EntitySet \'' . $entitySetName . '\' through the same' |
46 | 45 | . ' AssociationType. Make sure that if two or more AssociationSets refer to the same AssociationType,' |
@@ -143,8 +143,7 @@ discard block |
||
143 | 143 | $response .= false === $this->changeSetBoundary ? "\r\n" : "--\r\n"; |
144 | 144 | $response = 'Content-Length: ' . strlen($response) . "\r\n\r\n" . $response; |
145 | 145 | $response = false === $this->changeSetBoundary ? |
146 | - $response : |
|
147 | - 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response; |
|
146 | + $response : 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response; |
|
148 | 147 | return $response; |
149 | 148 | } |
150 | 149 | |
@@ -228,7 +227,7 @@ discard block |
||
228 | 227 | if ($contentIDinit == $contentID) { |
229 | 228 | $contentIDinit--; |
230 | 229 | } |
231 | - $this->rawRequests[$contentID] = (object)[ |
|
230 | + $this->rawRequests[$contentID] = (object) [ |
|
232 | 231 | 'RequestVerb' => $requestPathParts[0], |
233 | 232 | 'RequestURL' => $requestPathParts[1], |
234 | 233 | 'ServerParams' => $serverParts, |
@@ -28,8 +28,7 @@ discard block |
||
28 | 28 | $eTag, |
29 | 29 | $checkETagForEquality, |
30 | 30 | IOperationContext $operationContext |
31 | - ) |
|
32 | - { |
|
31 | + ) { |
|
33 | 32 | if (null == $resourceStreamInfo) { |
34 | 33 | return 'stream for ' . get_class($entity); |
35 | 34 | } |
@@ -51,8 +50,7 @@ discard block |
||
51 | 50 | ResourceStreamInfo $resourceStreamInfo = null, |
52 | 51 | IOperationContext $operationContext, |
53 | 52 | $relativeUri = null |
54 | - ) |
|
55 | - { |
|
53 | + ) { |
|
56 | 54 | if (null == $resourceStreamInfo) { |
57 | 55 | return $relativeUri . '/$value'; |
58 | 56 | } |
@@ -69,8 +67,7 @@ discard block |
||
69 | 67 | $entity, |
70 | 68 | ResourceStreamInfo $resourceStreamInfo = null, |
71 | 69 | IOperationContext $operationContext |
72 | - ) |
|
73 | - { |
|
70 | + ) { |
|
74 | 71 | if (null == $resourceStreamInfo) { |
75 | 72 | return '*/*'; |
76 | 73 | } |
@@ -87,8 +84,7 @@ discard block |
||
87 | 84 | $entity, |
88 | 85 | ResourceStreamInfo $resourceStreamInfo = null, |
89 | 86 | IOperationContext $operationContext |
90 | - ) |
|
91 | - { |
|
87 | + ) { |
|
92 | 88 | if (null == $resourceStreamInfo) { |
93 | 89 | return spl_object_hash($entity); |
94 | 90 | } |
@@ -109,8 +105,7 @@ discard block |
||
109 | 105 | ResourceStreamInfo $resourceStreamInfo = null, |
110 | 106 | IOperationContext $operationContext, |
111 | 107 | $relativeUri = null |
112 | - ) |
|
113 | - { |
|
108 | + ) { |
|
114 | 109 | if (null == $resourceStreamInfo) { |
115 | 110 | return $relativeUri . '/$value'; |
116 | 111 | } |
@@ -422,8 +422,7 @@ |
||
422 | 422 | $entity, |
423 | 423 | ResourceStreamInfo $resourceStreamInfo = null, |
424 | 424 | $mediaLinkEntryUri |
425 | - ) |
|
426 | - { |
|
425 | + ) { |
|
427 | 426 | $this->saveContentTypeAndETag(); |
428 | 427 | $opContext = $this->service->getOperationContext(); |
429 | 428 | if (null === $resourceStreamInfo) { |
@@ -74,8 +74,7 @@ discard block |
||
74 | 74 | $top = null, |
75 | 75 | $skip = null, |
76 | 76 | $skipToken = null |
77 | - ) |
|
78 | - { |
|
77 | + ) { |
|
79 | 78 | $queryResult = $this->getQueryProvider()->getRelatedResourceSet( |
80 | 79 | $queryType, |
81 | 80 | $sourceResourceSet, |
@@ -180,8 +179,7 @@ discard block |
||
180 | 179 | $skip = null, |
181 | 180 | SkipTokenInfo $skipToken = null, |
182 | 181 | array $eagerLoad = null |
183 | - ) |
|
184 | - { |
|
182 | + ) { |
|
185 | 183 | $queryResult = $this->getQueryProvider()->getResourceSet( |
186 | 184 | $queryType, |
187 | 185 | $resourceSet, |
@@ -211,8 +209,7 @@ discard block |
||
211 | 209 | ResourceSet $resourceSet, |
212 | 210 | KeyDescriptor $keyDescriptor, |
213 | 211 | $data |
214 | - ) |
|
215 | - { |
|
212 | + ) { |
|
216 | 213 | $queryResult = $this->getQueryProvider()->putResource( |
217 | 214 | $resourceSet, |
218 | 215 | $keyDescriptor, |
@@ -259,8 +256,7 @@ discard block |
||
259 | 256 | ResourceSet $resourceSet, |
260 | 257 | $sourceEntityInstance, |
261 | 258 | $data |
262 | - ) |
|
263 | - { |
|
259 | + ) { |
|
264 | 260 | return $this->getQueryProvider()->createResourceforResourceSet( |
265 | 261 | $resourceSet, |
266 | 262 | $sourceEntityInstance, |
@@ -279,8 +275,7 @@ discard block |
||
279 | 275 | public function deleteResource( |
280 | 276 | ResourceSet $sourceResourceSet, |
281 | 277 | $sourceEntityInstance |
282 | - ) |
|
283 | - { |
|
278 | + ) { |
|
284 | 279 | return $this->getQueryProvider()->deleteResource( |
285 | 280 | $sourceResourceSet, |
286 | 281 | $sourceEntityInstance |
@@ -304,8 +299,7 @@ discard block |
||
304 | 299 | KeyDescriptor $keyDescriptor, |
305 | 300 | $data, |
306 | 301 | $shouldUpdate = false |
307 | - ) |
|
308 | - { |
|
302 | + ) { |
|
309 | 303 | return $this->getQueryProvider()->updateResource( |
310 | 304 | $sourceResourceSet, |
311 | 305 | $sourceEntityInstance, |
@@ -325,8 +319,7 @@ discard block |
||
325 | 319 | public function createBulkResourceforResourceSet( |
326 | 320 | ResourceSet $sourceResourceSet, |
327 | 321 | array $data |
328 | - ) |
|
329 | - { |
|
322 | + ) { |
|
330 | 323 | return $this->getQueryProvider()->createBulkResourceforResourceSet( |
331 | 324 | $sourceResourceSet, |
332 | 325 | $data |
@@ -350,8 +343,7 @@ discard block |
||
350 | 343 | array $keyDescriptor, |
351 | 344 | array $data, |
352 | 345 | $shouldUpdate = false |
353 | - ) |
|
354 | - { |
|
346 | + ) { |
|
355 | 347 | return $this->getQueryProvider()->updateBulkResource( |
356 | 348 | $sourceResourceSet, |
357 | 349 | $sourceEntityInstance, |
@@ -382,8 +374,7 @@ discard block |
||
382 | 374 | $sourceEntity, |
383 | 375 | ResourceSet $targetResourceSet, |
384 | 376 | ResourceProperty $targetProperty |
385 | - ) |
|
386 | - { |
|
377 | + ) { |
|
387 | 378 | $entityInstance = $this->getQueryProvider()->getRelatedResourceReference( |
388 | 379 | $sourceResourceSet, |
389 | 380 | $sourceEntity, |
@@ -465,8 +456,7 @@ discard block |
||
465 | 456 | ResourceSet $targetResourceSet, |
466 | 457 | ResourceProperty $targetProperty, |
467 | 458 | KeyDescriptor $keyDescriptor |
468 | - ) |
|
469 | - { |
|
459 | + ) { |
|
470 | 460 | $entityInstance = $this->getQueryProvider()->getResourceFromRelatedResourceSet( |
471 | 461 | $sourceResourceSet, |
472 | 462 | $sourceEntity, |
@@ -504,8 +494,7 @@ discard block |
||
504 | 494 | ResourceSet &$resourceSet, |
505 | 495 | KeyDescriptor &$keyDescriptor, |
506 | 496 | $methodName |
507 | - ) |
|
508 | - { |
|
497 | + ) { |
|
509 | 498 | if (null === $entityInstance) { |
510 | 499 | throw ODataException::createResourceNotFoundError($resourceSet->getName()); |
511 | 500 | } |
@@ -549,8 +538,7 @@ discard block |
||
549 | 538 | ResourceSet $resourceSet, |
550 | 539 | KeyDescriptor $keyDescriptor, |
551 | 540 | array $eagerLoad = null |
552 | - ) |
|
553 | - { |
|
541 | + ) { |
|
554 | 542 | $entityInstance = $this->getQueryProvider() |
555 | 543 | ->getResourceFromResourceSet($resourceSet, $keyDescriptor, $eagerLoad); |
556 | 544 | $this->validateEntityInstance( |
@@ -580,8 +568,7 @@ discard block |
||
580 | 568 | ResourceSet $targetResourceSet, |
581 | 569 | $targetEntityInstance, |
582 | 570 | $navPropName |
583 | - ) |
|
584 | - { |
|
571 | + ) { |
|
585 | 572 | return $this->getQueryProvider()->hookSingleModel( |
586 | 573 | $sourceResourceSet, |
587 | 574 | $sourceEntityInstance, |
@@ -608,8 +595,7 @@ discard block |
||
608 | 595 | ResourceSet $targetResourceSet, |
609 | 596 | $targetEntityInstance, |
610 | 597 | $navPropName |
611 | - ) |
|
612 | - { |
|
598 | + ) { |
|
613 | 599 | return $this->getQueryProvider()->unhookSingleModel( |
614 | 600 | $sourceResourceSet, |
615 | 601 | $sourceEntityInstance, |
@@ -449,8 +449,7 @@ discard block |
||
449 | 449 | ResourceSetWrapper $resourceSetWrapper, |
450 | 450 | ResourceEntityType $resourceType, |
451 | 451 | ResourceProperty $navigationResourceProperty |
452 | - ) |
|
453 | - { |
|
452 | + ) { |
|
454 | 453 | $associationSet = $this->getResourceAssociationSet( |
455 | 454 | $resourceSetWrapper, |
456 | 455 | $resourceType, |
@@ -490,8 +489,7 @@ discard block |
||
490 | 489 | ResourceSet $set, |
491 | 490 | ResourceEntityType $type, |
492 | 491 | ResourceProperty $property |
493 | - ) |
|
494 | - { |
|
492 | + ) { |
|
495 | 493 | $type = $this->getResourceTypeWherePropertyIsDeclared($type, $property); |
496 | 494 | // usage below requires $type to not be null - so kaboom as early as possible |
497 | 495 | assert(null != $type, 'Resource type obtained from property must not be null.'); |
@@ -652,8 +650,7 @@ discard block |
||
652 | 650 | $skip = null, |
653 | 651 | SkipTokenInfo $skipToken = null, |
654 | 652 | array $eagerLoad = [] |
655 | - ) |
|
656 | - { |
|
653 | + ) { |
|
657 | 654 | return $this->getProviderWrapper()->getResourceSet( |
658 | 655 | $queryType, |
659 | 656 | $resourceSet, |
@@ -682,8 +679,7 @@ discard block |
||
682 | 679 | ResourceSet $resourceSet, |
683 | 680 | KeyDescriptor $keyDescriptor, |
684 | 681 | array $eagerLoad = null |
685 | - ) |
|
686 | - { |
|
682 | + ) { |
|
687 | 683 | return $this->getProviderWrapper()->getResourceFromResourceSet($resourceSet, $keyDescriptor, $eagerLoad); |
688 | 684 | } |
689 | 685 | |
@@ -700,8 +696,7 @@ discard block |
||
700 | 696 | ResourceSet $resourceSet, |
701 | 697 | KeyDescriptor $keyDescriptor, |
702 | 698 | $data |
703 | - ) |
|
704 | - { |
|
699 | + ) { |
|
705 | 700 | return $this->getProviderWrapper()->putResource( |
706 | 701 | $resourceSet, |
707 | 702 | $keyDescriptor, |
@@ -740,8 +735,7 @@ discard block |
||
740 | 735 | $top = null, |
741 | 736 | $skip = null, |
742 | 737 | SkipTokenInfo $skipToken = null |
743 | - ) |
|
744 | - { |
|
738 | + ) { |
|
745 | 739 | return $this->getProviderWrapper()->getRelatedResourceSet( |
746 | 740 | $queryType, |
747 | 741 | $sourceResourceSet, |
@@ -776,8 +770,7 @@ discard block |
||
776 | 770 | ResourceSet $targetResourceSet, |
777 | 771 | ResourceProperty $targetProperty, |
778 | 772 | KeyDescriptor $keyDescriptor |
779 | - ) |
|
780 | - { |
|
773 | + ) { |
|
781 | 774 | return $this->getProviderWrapper()->getResourceFromRelatedResourceSet( |
782 | 775 | $sourceResourceSet, |
783 | 776 | $sourceEntity, |
@@ -807,8 +800,7 @@ discard block |
||
807 | 800 | $sourceEntity, |
808 | 801 | ResourceSet $targetResourceSet, |
809 | 802 | ResourceProperty $targetProperty |
810 | - ) |
|
811 | - { |
|
803 | + ) { |
|
812 | 804 | return $this->getProviderWrapper()->getRelatedResourceReference( |
813 | 805 | $sourceResourceSet, |
814 | 806 | $sourceEntity, |
@@ -834,8 +826,7 @@ discard block |
||
834 | 826 | KeyDescriptor $keyDescriptor, |
835 | 827 | $data, |
836 | 828 | $shouldUpdate = false |
837 | - ) |
|
838 | - { |
|
829 | + ) { |
|
839 | 830 | return $this->getProviderWrapper()->updateResource( |
840 | 831 | $sourceResourceSet, |
841 | 832 | $sourceEntityInstance, |
@@ -856,8 +847,7 @@ discard block |
||
856 | 847 | public function deleteResource( |
857 | 848 | ResourceSet $sourceResourceSet, |
858 | 849 | $sourceEntityInstance |
859 | - ) |
|
860 | - { |
|
850 | + ) { |
|
861 | 851 | return $this->getProviderWrapper()->deleteResource( |
862 | 852 | $sourceResourceSet, |
863 | 853 | $sourceEntityInstance |
@@ -875,8 +865,7 @@ discard block |
||
875 | 865 | ResourceSet $resourceSet, |
876 | 866 | $sourceEntityInstance, |
877 | 867 | $data |
878 | - ) |
|
879 | - { |
|
868 | + ) { |
|
880 | 869 | return $this->getProviderWrapper()->createResourceforResourceSet( |
881 | 870 | $resourceSet, |
882 | 871 | $sourceEntityInstance, |
@@ -894,8 +883,7 @@ discard block |
||
894 | 883 | public function createBulkResourceforResourceSet( |
895 | 884 | ResourceSet $sourceResourceSet, |
896 | 885 | array $data |
897 | - ) |
|
898 | - { |
|
886 | + ) { |
|
899 | 887 | return $this->getProviderWrapper()->createBulkResourceforResourceSet( |
900 | 888 | $sourceResourceSet, |
901 | 889 | $data |
@@ -919,8 +907,7 @@ discard block |
||
919 | 907 | array $keyDescriptor, |
920 | 908 | array $data, |
921 | 909 | $shouldUpdate = false |
922 | - ) |
|
923 | - { |
|
910 | + ) { |
|
924 | 911 | return $this->getProviderWrapper()->updateBulkResource( |
925 | 912 | $sourceResourceSet, |
926 | 913 | $sourceEntityInstance, |
@@ -947,8 +934,7 @@ discard block |
||
947 | 934 | ResourceSet $targetResourceSet, |
948 | 935 | $targetEntityInstance, |
949 | 936 | $navPropName |
950 | - ) |
|
951 | - { |
|
937 | + ) { |
|
952 | 938 | return $this->getProviderWrapper()->hookSingleModel( |
953 | 939 | $sourceResourceSet, |
954 | 940 | $sourceEntityInstance, |
@@ -975,8 +961,7 @@ discard block |
||
975 | 961 | ResourceSet $targetResourceSet, |
976 | 962 | $targetEntityInstance, |
977 | 963 | $navPropName |
978 | - ) |
|
979 | - { |
|
964 | + ) { |
|
980 | 965 | return $this->getProviderWrapper()->unhookSingleModel( |
981 | 966 | $sourceResourceSet, |
982 | 967 | $sourceEntityInstance, |
@@ -195,8 +195,7 @@ |
||
195 | 195 | $namespaceName = null, |
196 | 196 | ResourceType $baseType = null, |
197 | 197 | $isAbstract = false |
198 | - ) |
|
199 | - { |
|
198 | + ) { |
|
200 | 199 | $this->type = $instanceType; |
201 | 200 | $this->resourceTypeKind = $resourceTypeKind; |
202 | 201 | $this->name = $name; |