@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | if (null !== $type) { |
174 | 174 | $rawTerm = $type->term; |
175 | 175 | $termArray = explode('.', $rawTerm); |
176 | - $this->resourceSetName = Str::plural($termArray[count($termArray)-1]); |
|
176 | + $this->resourceSetName = Str::plural($termArray[count($termArray) - 1]); |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | * @param \POData\ObjectModel\ODataMediaLink $mediaLink |
239 | 239 | * @param \POData\ObjectModel\ODataMediaLink|null $editLink |
240 | 240 | */ |
241 | - private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink &$editLink = null) |
|
241 | + private function handleMediaLinkEntry(ODataMediaLink $mediaLink, ODataMediaLink & $editLink = null) |
|
242 | 242 | { |
243 | 243 | if ('edit-media' == $mediaLink->rel) { |
244 | 244 | $this->isMediaLinkEntry = true; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * @param ODataEntry $payload |
39 | 39 | */ |
40 | - public function processPayload(ODataEntry &$payload) |
|
40 | + public function processPayload(ODataEntry & $payload) |
|
41 | 41 | { |
42 | 42 | assert($this->isEntryOK($payload)); |
43 | 43 | list($sourceSet, $source) = $this->processEntryContent($payload); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | return true; |
90 | 90 | } |
91 | 91 | |
92 | - protected function processEntryContent(ODataEntry &$content) |
|
92 | + protected function processEntryContent(ODataEntry & $content) |
|
93 | 93 | { |
94 | 94 | assert(null === $content->id || is_string($content->id), 'Entry id must be null or string'); |
95 | 95 | |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | $keyPredicate[strlen($keyPredicate) - 2] = ' '; |
165 | 165 | } else { |
166 | 166 | $idBits = explode('/', $id); |
167 | - $keyRaw = $idBits[count($idBits)-1]; |
|
167 | + $keyRaw = $idBits[count($idBits) - 1]; |
|
168 | 168 | $rawBits = explode('(', $keyRaw, 2); |
169 | - $rawBits = explode(')', $rawBits[count($rawBits)-1]); |
|
169 | + $rawBits = explode(')', $rawBits[count($rawBits) - 1]); |
|
170 | 170 | $keyPredicate = $rawBits[0]; |
171 | 171 | } |
172 | 172 | $keyPredicate = trim($keyPredicate); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | return $keyDesc; |
179 | 179 | } |
180 | 180 | |
181 | - protected function processLink(ODataLink &$link, ResourceSet $sourceSet, $source) |
|
181 | + protected function processLink(ODataLink & $link, ResourceSet $sourceSet, $source) |
|
182 | 182 | { |
183 | 183 | $hasUrl = isset($link->url); |
184 | 184 | $hasPayload = isset($link->expandedResult); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @param $hasUrl |
211 | 211 | * @param $hasPayload |
212 | 212 | */ |
213 | - protected function processLinkSingleton(ODataLink &$link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
213 | + protected function processLinkSingleton(ODataLink & $link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
214 | 214 | { |
215 | 215 | assert( |
216 | 216 | null === $link->expandedResult || $link->expandedResult instanceof ODataEntry, |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | return; |
267 | 267 | } |
268 | 268 | |
269 | - protected function processLinkFeed(ODataLink &$link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
269 | + protected function processLinkFeed(ODataLink & $link, ResourceSet $sourceSet, $source, $hasUrl, $hasPayload) |
|
270 | 270 | { |
271 | 271 | assert( |
272 | 272 | $link->expandedResult instanceof ODataFeed, |
@@ -165,7 +165,7 @@ |
||
165 | 165 | public function setStatusCode($value) |
166 | 166 | { |
167 | 167 | $rawCode = substr($value, 0, 3); |
168 | - assert(is_numeric($rawCode), 'Raw HTTP status code is not numeric - is '.$rawCode); |
|
168 | + assert(is_numeric($rawCode), 'Raw HTTP status code is not numeric - is ' . $rawCode); |
|
169 | 169 | $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] = $value; |
170 | 170 | $this->headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_CODE] = intval($rawCode); |
171 | 171 | } |
@@ -640,7 +640,7 @@ |
||
640 | 640 | ResourceEntityType $concreteType = null |
641 | 641 | ) { |
642 | 642 | $allowedMult = ['*', '1', '0..1']; |
643 | - $backMultArray = [ '*' => '*', '1' => '0..1', '0..1' => '1']; |
|
643 | + $backMultArray = ['*' => '*', '1' => '0..1', '0..1' => '1']; |
|
644 | 644 | $this->checkInstanceProperty($name, $sourceResourceType); |
645 | 645 | |
646 | 646 | // check that property and resource name don't up and collide - would violate OData spec |
@@ -202,7 +202,7 @@ |
||
202 | 202 | $stackDex = count($trackStack) - 1; |
203 | 203 | assert( |
204 | 204 | self::MAX_EXPAND_TREE_DEPTH > $stackDex, |
205 | - 'Expansion stack too deep - should be less than '. self::MAX_EXPAND_TREE_DEPTH . 'elements' |
|
205 | + 'Expansion stack too deep - should be less than ' . self::MAX_EXPAND_TREE_DEPTH . 'elements' |
|
206 | 206 | ); |
207 | 207 | $topNode = $trackStack[$stackDex]; |
208 | 208 | $nodes = $topNode['node']->getChildNodes(); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * @param KeyDescriptor|null $keyDescriptor |
126 | 126 | * @return bool |
127 | 127 | */ |
128 | - protected static function parseAndVerifyRawKeyPredicate($keyString, $isKey, KeyDescriptor &$keyDescriptor = null) |
|
128 | + protected static function parseAndVerifyRawKeyPredicate($keyString, $isKey, KeyDescriptor & $keyDescriptor = null) |
|
129 | 129 | { |
130 | 130 | $result = self::tryParseKeysFromRawKeyPredicate( |
131 | 131 | $keyString, |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public static function tryParseKeysFromKeyPredicate( |
239 | 239 | $keyPredicate, |
240 | - KeyDescriptor &$keyDescriptor = null |
|
240 | + KeyDescriptor & $keyDescriptor = null |
|
241 | 241 | ) { |
242 | 242 | $isKey = true; |
243 | 243 | $keyString = $keyPredicate; |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | $comma = null; |
568 | 568 | foreach ($keys as $keyName => $resourceProperty) { |
569 | 569 | if (!array_key_exists($keyName, $namedKeys)) { |
570 | - $msg = 'Key predicate '.$keyName.' not present in named values'; |
|
570 | + $msg = 'Key predicate ' . $keyName . ' not present in named values'; |
|
571 | 571 | throw new \InvalidArgumentException($msg); |
572 | 572 | } |
573 | 573 | $keyType = $resourceProperty->getInstanceType(); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | public function getResponse() |
57 | 57 | { |
58 | 58 | $response = ''; |
59 | - $splitter = '--' . $this->batchBoundary . "\r\n"; |
|
59 | + $splitter = '--' . $this->batchBoundary . "\r\n"; |
|
60 | 60 | $raw = $this->changeSetProcessors; |
61 | 61 | foreach ($raw as $contentID => &$workingObject) { |
62 | 62 | $response .= $splitter; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | protected $changeSetBoundary; |
13 | 13 | protected $rawRequests = []; |
14 | 14 | protected $service; |
15 | - protected $contentIDToLocationLookup =[]; |
|
15 | + protected $contentIDToLocationLookup = []; |
|
16 | 16 | |
17 | 17 | public function __construct(BaseService $service, $body) |
18 | 18 | { |
@@ -76,8 +76,7 @@ discard block |
||
76 | 76 | $response .= false === $this->changeSetBoundary ? "\r\n" : "--\r\n"; |
77 | 77 | $response = 'Content-Length: ' . strlen($response) . "\r\n\r\n" . $response; |
78 | 78 | $response = false === $this->changeSetBoundary ? |
79 | - $response : |
|
80 | - 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response; |
|
79 | + $response : 'Content-Type: multipart/mixed; boundary=' . $this->changeSetBoundary . "\r\n" . $response; |
|
81 | 80 | return $response; |
82 | 81 | } |
83 | 82 | |
@@ -131,7 +130,7 @@ discard block |
||
131 | 130 | } |
132 | 131 | $headerSides = explode(':', $line); |
133 | 132 | if (count($headerSides) != 2) { |
134 | - throw new \Exception('Malformed header line: '.$line); |
|
133 | + throw new \Exception('Malformed header line: ' . $line); |
|
135 | 134 | } |
136 | 135 | if (strtolower(trim($headerSides[0])) == strtolower('Content-ID')) { |
137 | 136 | $contentID = trim($headerSides[1]); |
@@ -158,7 +157,7 @@ discard block |
||
158 | 157 | if ($contentIDinit == $contentID) { |
159 | 158 | $contentIDinit--; |
160 | 159 | } |
161 | - $this->rawRequests[$contentID] = (object)[ |
|
160 | + $this->rawRequests[$contentID] = (object) [ |
|
162 | 161 | 'RequestVerb' => $requestPathParts[0], |
163 | 162 | 'RequestURL' => $requestPathParts[1], |
164 | 163 | 'ServerParams' => $serverParts, |