@@ -693,7 +693,7 @@ |
||
693 | 693 | ResourceEntityType $concreteType = null |
694 | 694 | ) { |
695 | 695 | $allowedMult = ['*', '1', '0..1']; |
696 | - $backMultArray = [ '*' => '*', '1' => '0..1', '0..1' => '1']; |
|
696 | + $backMultArray = ['*' => '*', '1' => '0..1', '0..1' => '1']; |
|
697 | 697 | $this->checkInstanceProperty($name, $sourceResourceType); |
698 | 698 | |
699 | 699 | // check that property and resource name don't up and collide - would violate OData spec |
@@ -43,14 +43,14 @@ |
||
43 | 43 | public function handleStartNode($tagNamespace, $tagName, $attributes) |
44 | 44 | { |
45 | 45 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
46 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
46 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
47 | 47 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
48 | 48 | } |
49 | 49 | |
50 | 50 | public function handleEndNode($tagNamespace, $tagName) |
51 | 51 | { |
52 | 52 | //The only sub notes that will exist will be the inline ones before we process the feed or entity. |
53 | - assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
53 | + assert($tagNamespace === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE)); |
|
54 | 54 | assert($tagName === strtolower(ODataConstants::ATOM_INLINE_ELEMENT_NAME)); |
55 | 55 | } |
56 | 56 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function handleStartAtomLink($attributes) |
79 | 79 | { |
80 | - $rel = $this->arrayKeyOrDefault( |
|
80 | + $rel = $this->arrayKeyOrDefault( |
|
81 | 81 | $attributes, |
82 | 82 | ODataConstants::ATOM_LINK_RELATION_ATTRIBUTE_NAME, |
83 | 83 | '' |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | public function handleStartMetadataCount() |
96 | 96 | { |
97 | 97 | $this->enqueueEnd(function () { |
98 | - $this->oDataFeed->rowCount = (int)$this->popCharData(); |
|
98 | + $this->oDataFeed->rowCount = (int) $this->popCharData(); |
|
99 | 99 | }); |
100 | 100 | } |
101 | 101 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | if (strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
46 | 46 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
47 | 47 | ) { |
48 | - return ; |
|
48 | + return; |
|
49 | 49 | } |
50 | 50 | //TODO: this will need to be expanded with opengis namespaces as well when supported |
51 | 51 | assert($tagNamespace === ODataConstants::ODATA_NAMESPACE || |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (strtolower($tagNamespace) === strtolower(ODataConstants::ODATA_METADATA_NAMESPACE) && |
72 | 72 | strtolower($tagName) === strtolower((ODataConstants::ATOM_PROPERTIES_ELEMENT_NAME)) |
73 | 73 | ) { |
74 | - return ; |
|
74 | + return; |
|
75 | 75 | } |
76 | 76 | // Pops a complex object off the stack |
77 | 77 | $prop = $this->properties->pop(); |
@@ -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, |
@@ -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) { |
@@ -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(): |
@@ -205,7 +205,7 @@ |
||
205 | 205 | |
206 | 206 | case 'Edm.DateTime': |
207 | 207 | $dateTime = new Carbon($value, new DateTimeZone('UTC')); |
208 | - $formattedDateTime = $dateTime->format('U') * 1000; |
|
208 | + $formattedDateTime = $dateTime->format('U')*1000; |
|
209 | 209 | $this->writeCore('/Date(' . $formattedDateTime . ')/', /* quotes */ true); |
210 | 210 | break; |
211 | 211 |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | return false; |
749 | 749 | } |
750 | 750 | |
751 | - return 0 == ($value % 4); |
|
751 | + return 0 == ($value%4); |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | /** |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | ODataConstants::HTTPQUERY_STRING_EXPAND, |
881 | 881 | ODataConstants::HTTPQUERY_STRING_ORDERBY, |
882 | 882 | ODataConstants::HTTPQUERY_STRING_INLINECOUNT, |
883 | - ODataConstants::HTTPQUERY_STRING_SELECT,] as $queryOption) { |
|
883 | + ODataConstants::HTTPQUERY_STRING_SELECT, ] as $queryOption) { |
|
884 | 884 | $value = $this->getService()->getHost()->getQueryStringItem($queryOption); |
885 | 885 | if (null !== $value) { |
886 | 886 | if (null !== $queryParameterString) { |