@@ -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, |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @param KeyDescriptor|null $keyDescriptor |
| 111 | 111 | * @return bool |
| 112 | 112 | */ |
| 113 | - protected static function parseAndVerifyRawKeyPredicate($keyString, $isKey, KeyDescriptor &$keyDescriptor = null) |
|
| 113 | + protected static function parseAndVerifyRawKeyPredicate($keyString, $isKey, KeyDescriptor & $keyDescriptor = null) |
|
| 114 | 114 | { |
| 115 | 115 | $result = self::tryParseKeysFromRawKeyPredicate( |
| 116 | 116 | $keyString, |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | public static function tryParseKeysFromKeyPredicate( |
| 224 | 224 | $keyPredicate, |
| 225 | - KeyDescriptor &$keyDescriptor = null |
|
| 225 | + KeyDescriptor & $keyDescriptor = null |
|
| 226 | 226 | ) { |
| 227 | 227 | $isKey = true; |
| 228 | 228 | $keyString = $keyPredicate; |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | $comma = null; |
| 553 | 553 | foreach ($keys as $keyName => $resourceProperty) { |
| 554 | 554 | if (!array_key_exists($keyName, $namedKeys)) { |
| 555 | - $msg = 'Key predicate '.$keyName.' not present in named values'; |
|
| 555 | + $msg = 'Key predicate ' . $keyName . ' not present in named values'; |
|
| 556 | 556 | throw new \InvalidArgumentException($msg); |
| 557 | 557 | } |
| 558 | 558 | $keyType = $resourceProperty->getInstanceType(); |
@@ -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(); |