@@ -141,7 +141,7 @@ |
||
141 | 141 | $searchArraySize = count($searchArray) - 1; |
142 | 142 | $high = $searchArraySize; |
143 | 143 | do { |
144 | - $mid = intval($low + round(($high - $low) / 2)); |
|
144 | + $mid = intval($low + round(($high - $low)/2)); |
|
145 | 145 | $result = $comparer($keyObject, $searchArray[$mid]); |
146 | 146 | if ($result > 0) { |
147 | 147 | $low = $mid + 1; |
@@ -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 |
@@ -116,8 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | $response = ''; |
118 | 118 | $splitter = false === $this->changeSetBoundary ? |
119 | - '' : |
|
120 | - '--' . $this->changeSetBoundary . $ODataEOL; |
|
119 | + '' : '--' . $this->changeSetBoundary . $ODataEOL; |
|
121 | 120 | $raw = $this->getRawRequests(); |
122 | 121 | foreach ($raw as $contentID => &$workingObject) { |
123 | 122 | $headers = $workingObject->outgoingResponse()->getHeaders(); |
@@ -139,16 +138,14 @@ discard block |
||
139 | 138 | } |
140 | 139 | $response .= trim($splitter); |
141 | 140 | $response .= false === $this->changeSetBoundary ? |
142 | - $ODataEOL : |
|
143 | - '--' . $ODataEOL; |
|
141 | + $ODataEOL : '--' . $ODataEOL; |
|
144 | 142 | $response = 'Content-Length: ' . |
145 | 143 | strlen($response) . |
146 | 144 | $ODataEOL . |
147 | 145 | $ODataEOL . |
148 | 146 | $response; |
149 | 147 | $response = false === $this->changeSetBoundary ? |
150 | - $response : |
|
151 | - 'Content-Type: multipart/mixed; boundary=' . |
|
148 | + $response : 'Content-Type: multipart/mixed; boundary=' . |
|
152 | 149 | $this->changeSetBoundary . |
153 | 150 | $ODataEOL . |
154 | 151 | $response; |
@@ -27,15 +27,15 @@ |
||
27 | 27 | $name = strtr(strtoupper(trim($key)), '-', '_'); |
28 | 28 | $value = trim($value); |
29 | 29 | $name = substr($name, 0, 5) === 'HTTP_' || $name == 'CONTENT_TYPE' ? $name : 'HTTP_' . $name; |
30 | - if('HTTP_CONTENT_ID' === $name){ |
|
30 | + if ('HTTP_CONTENT_ID' === $name) { |
|
31 | 31 | $this->contentID = $value; |
32 | - }else { |
|
32 | + } else { |
|
33 | 33 | $inboundRequestHeaders[$name] = $value; |
34 | 34 | } |
35 | 35 | $headerLine = strtok("\n"); |
36 | 36 | } |
37 | 37 | $host = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? $_SERVER['SERVER_ADDR'] ?? 'localhost'; |
38 | - $protocol=$_SERVER['PROTOCOL'] = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http'; |
|
38 | + $protocol = $_SERVER['PROTOCOL'] = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http'; |
|
39 | 39 | |
40 | 40 | parent::__construct( |
41 | 41 | new HTTPRequestMethod($RequesetType), |
@@ -27,9 +27,9 @@ |
||
27 | 27 | $name = strtr(strtoupper(trim($key)), '-', '_'); |
28 | 28 | $value = trim($value); |
29 | 29 | $name = substr($name, 0, 5) === 'HTTP_' || $name == 'CONTENT_TYPE' ? $name : 'HTTP_' . $name; |
30 | - if('HTTP_CONTENT_ID' === $name){ |
|
30 | + if('HTTP_CONTENT_ID' === $name) { |
|
31 | 31 | $this->contentID = $value; |
32 | - }else { |
|
32 | + } else { |
|
33 | 33 | $inboundRequestHeaders[$name] = $value; |
34 | 34 | } |
35 | 35 | $headerLine = strtok("\n"); |