@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @return ODataFeed |
32 | 32 | */ |
33 | - public function writeTopLevelElements(QueryResult &$entryObjects); |
|
33 | + public function writeTopLevelElements(QueryResult & $entryObjects); |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * Write top level url element. |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @return ODataPropertyContent |
62 | 62 | */ |
63 | - public function writeTopLevelComplexObject(QueryResult &$complexValue, $propertyName, ResourceType &$resourceType); |
|
63 | + public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType); |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Write top level bag resource. |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @return ODataPropertyContent |
72 | 72 | * @internal param QueryResult $BagValue Results property contains the bag object to be written |
73 | 73 | */ |
74 | - public function writeTopLevelBagObject(QueryResult &$bagValue, $propertyName, ResourceType &$resourceType); |
|
74 | + public function writeTopLevelBagObject(QueryResult & $bagValue, $propertyName, ResourceType & $resourceType); |
|
75 | 75 | |
76 | 76 | /** |
77 | 77 | * Write top level primitive value. |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * |
82 | 82 | * @return ODataPropertyContent |
83 | 83 | */ |
84 | - public function writeTopLevelPrimitive(QueryResult &$primitiveValue, ResourceProperty &$resourceProperty = null); |
|
84 | + public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null); |
|
85 | 85 | |
86 | 86 | /** |
87 | 87 | * Gets reference to the request submitted by client. |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | * |
667 | 667 | * @param InternalOrderByInfo &$internalOrderByInfo The sorting information |
668 | 668 | */ |
669 | - public function setInternalOrderByInfo(InternalOrderByInfo &$internalOrderByInfo) |
|
669 | + public function setInternalOrderByInfo(InternalOrderByInfo & $internalOrderByInfo) |
|
670 | 670 | { |
671 | 671 | $this->internalOrderByInfo = $internalOrderByInfo; |
672 | 672 | } |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | * @param InternalSkipTokenInfo &$internalSkipTokenInfo The paging information |
688 | 688 | */ |
689 | 689 | public function setInternalSkipTokenInfo( |
690 | - InternalSkipTokenInfo &$internalSkipTokenInfo |
|
690 | + InternalSkipTokenInfo & $internalSkipTokenInfo |
|
691 | 691 | ) { |
692 | 692 | $this->internalSkipTokenInfo = $internalSkipTokenInfo; |
693 | 693 | } |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | * |
714 | 714 | * @param RootProjectionNode &$rootProjectionNode Root of the projection tree |
715 | 715 | */ |
716 | - public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode) |
|
716 | + public function setRootProjectionNode(RootProjectionNode & $rootProjectionNode) |
|
717 | 717 | { |
718 | 718 | $this->rootProjectionNode = $rootProjectionNode; |
719 | 719 | } |
@@ -423,8 +423,8 @@ |
||
423 | 423 | */ |
424 | 424 | protected function validateEntityInstance( |
425 | 425 | $entityInstance, |
426 | - ResourceSet &$resourceSet, |
|
427 | - KeyDescriptor &$keyDescriptor, |
|
426 | + ResourceSet & $resourceSet, |
|
427 | + KeyDescriptor & $keyDescriptor, |
|
428 | 428 | $methodName |
429 | 429 | ) { |
430 | 430 | if (null === $entityInstance) { |
@@ -78,7 +78,6 @@ |
||
78 | 78 | $this->eTag = $eTag; |
79 | 79 | $this->name = $name; |
80 | 80 | $this->srcLink = $srcLink; |
81 | - $this->rel = (null !== $rel) ? $rel : |
|
82 | - ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
81 | + $this->rel = (null !== $rel) ? $rel : ODataConstants::ATOM_MEDIA_RESOURCE_RELATION_ATTRIBUTE_VALUE . $name; |
|
83 | 82 | } |
84 | 83 | } |
@@ -615,7 +615,7 @@ |
||
615 | 615 | */ |
616 | 616 | public function setResponseStatusCode(int $value): void |
617 | 617 | { |
618 | - $floor = floor($value / 100); |
|
618 | + $floor = floor($value/100); |
|
619 | 619 | if ($floor >= 1 && $floor <= 5) { |
620 | 620 | $statusDescription = HttpStatus::getStatusDescription($value); |
621 | 621 | if (null !== $statusDescription) { |
@@ -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) { |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | if ($flag1 && $flag2) { |
135 | 135 | return 0; |
136 | 136 | } elseif ($flag1) { |
137 | - return $ascend * -1; |
|
137 | + return $ascend*-1; |
|
138 | 138 | } elseif ($flag2) { |
139 | - return $ascend * 1; |
|
139 | + return $ascend*1; |
|
140 | 140 | } |
141 | 141 | $type = $this->resourceProperty->getInstanceType(); |
142 | 142 | if ($type instanceof DateTime) { |
@@ -147,10 +147,10 @@ discard block |
||
147 | 147 | $result = strcmp($accessor1, $accessor2); |
148 | 148 | } else { |
149 | 149 | $delta = $accessor1 - $accessor2; |
150 | - $result = (0 == $delta) ? 0 : $delta / abs($delta); |
|
150 | + $result = (0 == $delta) ? 0 : $delta/abs($delta); |
|
151 | 151 | } |
152 | 152 | |
153 | - return $ascend * $result; |
|
153 | + return $ascend*$result; |
|
154 | 154 | }; |
155 | 155 | |
156 | 156 | return $retVal; |
@@ -394,8 +394,7 @@ |
||
394 | 394 | private function executeGetResourceRelated(SegmentDescriptor $segment, $eagerList) |
395 | 395 | { |
396 | 396 | $projectedProperty = $segment->getProjectedProperty(); |
397 | - $projectedPropertyKind = null !== $projectedProperty ? $projectedProperty->getKind() : |
|
398 | - new ResourcePropertyKind(0); |
|
397 | + $projectedPropertyKind = null !== $projectedProperty ? $projectedProperty->getKind() : new ResourcePropertyKind(0); |
|
399 | 398 | $queryResult = null; |
400 | 399 | switch ($projectedPropertyKind) { |
401 | 400 | case ResourcePropertyKind::RESOURCE_REFERENCE(): |
@@ -207,7 +207,7 @@ |
||
207 | 207 | |
208 | 208 | case 'Edm.DateTime': |
209 | 209 | $dateTime = new DateTime($value, new DateTimeZone('UTC')); |
210 | - $formattedDateTime = $dateTime->format('U') * 1000; |
|
210 | + $formattedDateTime = $dateTime->format('U')*1000; |
|
211 | 211 | $this->writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true); |
212 | 212 | break; |
213 | 213 |