@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $expectedParms = count($baseParms); |
136 | 136 | $actualParms = count($parms); |
137 | 137 | if ($expectedParms != $actualParms) { |
138 | - $msg = 'Was expecting '. $expectedParms. ' arguments, received '.$actualParms.' instead'; |
|
138 | + $msg = 'Was expecting ' . $expectedParms . ' arguments, received ' . $actualParms . ' instead'; |
|
139 | 139 | throw new \InvalidArgumentException($msg); |
140 | 140 | } |
141 | 141 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | private function checkBlacklist($func, $fromArray = false) |
150 | 150 | { |
151 | 151 | if (in_array($func, $this->blacklist) || in_array(strtolower($func), $this->blacklist)) { |
152 | - $msg = (true === $fromArray ? 'First element of ' : '').'FunctionName blacklisted'; |
|
152 | + $msg = (true === $fromArray ? 'First element of ' : '') . 'FunctionName blacklisted'; |
|
153 | 153 | throw new \InvalidArgumentException($msg); |
154 | 154 | } |
155 | 155 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | $type = null; |
296 | 296 | if ($typeKind == ResourceTypeKind::ENTITY) { |
297 | 297 | list($oet, $entitySet) = $this->metadataManager->addEntityType($name); |
298 | - assert($oet instanceof TEntityTypeType, 'Entity type '.$name. ' not successfully added'); |
|
298 | + assert($oet instanceof TEntityTypeType, 'Entity type ' . $name . ' not successfully added'); |
|
299 | 299 | $type = new ResourceEntityType($refClass, $oet, $this); |
300 | 300 | $typeName = $type->getFullName(); |
301 | 301 | $returnName = Str::plural($typeName); |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | ); |
596 | 596 | } |
597 | 597 | if (!in_array($resourceMult, $allowedMult)) { |
598 | - throw new InvalidOperationException('Supplied multiplicity '.$resourceMult.' not valid'); |
|
598 | + throw new InvalidOperationException('Supplied multiplicity ' . $resourceMult . ' not valid'); |
|
599 | 599 | } |
600 | 600 | |
601 | 601 | $resourcePropertyKind = ('*' == $resourceMult) |
@@ -889,12 +889,12 @@ discard block |
||
889 | 889 | throw new \InvalidArgumentException($msg); |
890 | 890 | } |
891 | 891 | if (array_key_exists($name, $this->resourceSets)) { |
892 | - $msg = 'Resource set with same name, '. $name. ', exists'; |
|
892 | + $msg = 'Resource set with same name, ' . $name . ', exists'; |
|
893 | 893 | throw new \InvalidArgumentException($msg); |
894 | 894 | } |
895 | 895 | $typeName = $returnType->getName(); |
896 | 896 | if (!array_key_exists($typeName, $this->OdataEntityMap)) { |
897 | - $msg = 'Mapping not defined for '.$typeName; |
|
897 | + $msg = 'Mapping not defined for ' . $typeName; |
|
898 | 898 | throw new \InvalidArgumentException($msg); |
899 | 899 | } |
900 | 900 | $metaReturn = $this->OdataEntityMap[$typeName]; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return ODataFeed |
77 | 77 | */ |
78 | - public function writeTopLevelElements(QueryResult &$entryObjects) |
|
78 | + public function writeTopLevelElements(QueryResult & $entryObjects) |
|
79 | 79 | { |
80 | 80 | assert(is_array($entryObjects->results), '!is_array($entryObjects->results)'); |
81 | 81 | $requestTargetSource = $this->getRequest()->getTargetSource(); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @return ODataPropertyContent |
192 | 192 | */ |
193 | 193 | public function writeTopLevelComplexObject( |
194 | - QueryResult &$complexValue, |
|
194 | + QueryResult & $complexValue, |
|
195 | 195 | $propertyName, |
196 | 196 | ResourceType & $resourceType |
197 | 197 | ) { |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | * @return ODataPropertyContent |
218 | 218 | */ |
219 | 219 | public function writeTopLevelBagObject( |
220 | - QueryResult &$BagValue, |
|
220 | + QueryResult & $BagValue, |
|
221 | 221 | $propertyName, |
222 | - ResourceType &$resourceType |
|
222 | + ResourceType & $resourceType |
|
223 | 223 | ) { |
224 | 224 | $propertyContent = new ODataPropertyContent(); |
225 | 225 | $this->writeBagValue( |
@@ -242,8 +242,8 @@ discard block |
||
242 | 242 | * @return ODataPropertyContent |
243 | 243 | */ |
244 | 244 | public function writeTopLevelPrimitive( |
245 | - QueryResult &$primitiveValue, |
|
246 | - ResourceProperty &$resourceProperty = null |
|
245 | + QueryResult & $primitiveValue, |
|
246 | + ResourceProperty & $resourceProperty = null |
|
247 | 247 | ) { |
248 | 248 | assert(null != $resourceProperty, 'Resource property must not be null'); |
249 | 249 | $propertyContent = new ODataPropertyContent(); |
@@ -331,11 +331,11 @@ discard block |
||
331 | 331 | */ |
332 | 332 | private function writeFeedElements( |
333 | 333 | &$entryObjects, |
334 | - ResourceType &$resourceType, |
|
334 | + ResourceType & $resourceType, |
|
335 | 335 | $title, |
336 | 336 | $absoluteUri, |
337 | 337 | $relativeUri, |
338 | - ODataFeed &$feed, |
|
338 | + ODataFeed & $feed, |
|
339 | 339 | $needLink = false |
340 | 340 | ) { |
341 | 341 | assert(is_array($entryObjects), '!_writeFeedElements::is_array($entryObjects)'); |
@@ -392,11 +392,11 @@ discard block |
||
392 | 392 | */ |
393 | 393 | private function writeObjectProperties( |
394 | 394 | $customObject, |
395 | - ResourceType &$resourceType, |
|
395 | + ResourceType & $resourceType, |
|
396 | 396 | $absoluteUri, |
397 | 397 | $relativeUri, |
398 | 398 | &$odataEntry, |
399 | - ODataPropertyContent &$odataPropertyContent |
|
399 | + ODataPropertyContent & $odataPropertyContent |
|
400 | 400 | ) { |
401 | 401 | $resourceTypeKind = $resourceType->getResourceTypeKind(); |
402 | 402 | if (is_null($absoluteUri) == (ResourceTypeKind::ENTITY == $resourceTypeKind) |
@@ -519,8 +519,8 @@ discard block |
||
519 | 519 | */ |
520 | 520 | private function writePrimitiveValue( |
521 | 521 | &$primitiveValue, |
522 | - ODataProperty &$odataProperty, |
|
523 | - ResourceProperty &$resourceProperty |
|
522 | + ODataProperty & $odataProperty, |
|
523 | + ResourceProperty & $resourceProperty |
|
524 | 524 | ) { |
525 | 525 | if (is_object($primitiveValue)) { |
526 | 526 | //TODO ERROR: The property 'PropertyName' |
@@ -554,9 +554,9 @@ discard block |
||
554 | 554 | private function writeComplexValue( |
555 | 555 | &$complexValue, |
556 | 556 | $propertyName, |
557 | - ResourceType &$resourceType, |
|
557 | + ResourceType & $resourceType, |
|
558 | 558 | $relativeUri, |
559 | - ODataPropertyContent &$odataPropertyContent |
|
559 | + ODataPropertyContent & $odataPropertyContent |
|
560 | 560 | ) { |
561 | 561 | $odataProperty = new ODataProperty(); |
562 | 562 | $odataProperty->name = $propertyName; |
@@ -595,9 +595,9 @@ discard block |
||
595 | 595 | private function writeBagValue( |
596 | 596 | &$BagValue, |
597 | 597 | $propertyName, |
598 | - ResourceType &$resourceType, |
|
598 | + ResourceType & $resourceType, |
|
599 | 599 | $relativeUri, |
600 | - ODataPropertyContent &$odataPropertyContent |
|
600 | + ODataPropertyContent & $odataPropertyContent |
|
601 | 601 | ) { |
602 | 602 | assert(null == $BagValue || is_array($BagValue), 'Bag parameter must be null or array'); |
603 | 603 | $bagItemResourceTypeKind = $resourceType->getResourceTypeKind(); |
@@ -655,10 +655,10 @@ discard block |
||
655 | 655 | */ |
656 | 656 | private function writeMediaResourceMetadata( |
657 | 657 | $entryObject, |
658 | - ResourceType &$resourceType, |
|
658 | + ResourceType & $resourceType, |
|
659 | 659 | $title, |
660 | 660 | $relativeUri, |
661 | - ODataEntry &$odataEntry |
|
661 | + ODataEntry & $odataEntry |
|
662 | 662 | ) { |
663 | 663 | $streamProviderWrapper = $this->getService()->getStreamProviderWrapper(); |
664 | 664 | assert(null != $streamProviderWrapper, 'Retrieved stream provider must not be null'); |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | * @return string |
732 | 732 | */ |
733 | 733 | private function primitiveToString( |
734 | - ResourceType &$primitiveResourceType, |
|
734 | + ResourceType & $primitiveResourceType, |
|
735 | 735 | $primitiveValue |
736 | 736 | ) { |
737 | 737 | $type = $primitiveResourceType->getInstanceType(); |
@@ -770,9 +770,9 @@ discard block |
||
770 | 770 | private function complexObjectToContent( |
771 | 771 | &$complexValue, |
772 | 772 | $propertyName, |
773 | - ResourceType &$resourceType, |
|
773 | + ResourceType & $resourceType, |
|
774 | 774 | $relativeUri, |
775 | - ODataPropertyContent &$odataPropertyContent |
|
775 | + ODataPropertyContent & $odataPropertyContent |
|
776 | 776 | ) { |
777 | 777 | $count = count($this->complexTypeInstanceCollection); |
778 | 778 | for ($i = 0; $i < $count; ++$i) { |
@@ -815,9 +815,9 @@ discard block |
||
815 | 815 | */ |
816 | 816 | private function writeObjectPropertiesUnexpanded( |
817 | 817 | $customObject, |
818 | - ResourceType &$resourceType, |
|
818 | + ResourceType & $resourceType, |
|
819 | 819 | $relativeUri, |
820 | - ODataPropertyContent &$odataPropertyContent, |
|
820 | + ODataPropertyContent & $odataPropertyContent, |
|
821 | 821 | $resourceTypeKind, |
822 | 822 | $navigationProperties |
823 | 823 | ) { |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | if (28 < $resourceKind) { |
918 | 918 | return false; |
919 | 919 | } |
920 | - return 0 == ($resourceKind % 4); |
|
920 | + return 0 == ($resourceKind%4); |
|
921 | 921 | } |
922 | 922 | |
923 | 923 | |
@@ -935,9 +935,9 @@ discard block |
||
935 | 935 | */ |
936 | 936 | private function writeObjectPropertiesExpanded( |
937 | 937 | $customObject, |
938 | - ResourceType &$resourceType, |
|
938 | + ResourceType & $resourceType, |
|
939 | 939 | $relativeUri, |
940 | - ODataPropertyContent &$odataPropertyContent, |
|
940 | + ODataPropertyContent & $odataPropertyContent, |
|
941 | 941 | $projectionNodes, |
942 | 942 | $navigationProperties |
943 | 943 | ) { |