@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | // so we can't bail out early |
| 383 | 383 | $rawCount += $results->count(); |
| 384 | 384 | // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz |
| 385 | - if ($rawTop > $resultSet->count() + $skip) { |
|
| 385 | + if ($rawTop > $resultSet->count()+$skip) { |
|
| 386 | 386 | $resultSet = collect(array_merge($resultSet->all(), $results->all())); |
| 387 | 387 | $sliceAmount = min($skip, $resultSet->count()); |
| 388 | 388 | $resultSet = $resultSet->slice($sliceAmount); |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | if (QueryType::COUNT() == $qVal || QueryType::ENTITIES_WITH_COUNT() == $qVal) { |
| 455 | 455 | $result->count = $resultCount; |
| 456 | 456 | } |
| 457 | - $hazMore = $bulkSetCount > $skip + count($resultSet); |
|
| 457 | + $hazMore = $bulkSetCount > $skip+count($resultSet); |
|
| 458 | 458 | $result->hasMore = $hazMore; |
| 459 | 459 | } |
| 460 | 460 | } |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | |
| 137 | 137 | $topCountValue = $this->getRequest()->getTopOptionCount(); |
| 138 | 138 | if (null !== $topCountValue) { |
| 139 | - $remainingCount = $topCountValue - $this->getRequest()->getTopCount(); |
|
| 139 | + $remainingCount = $topCountValue-$this->getRequest()->getTopCount(); |
|
| 140 | 140 | if (0 < $remainingCount) { |
| 141 | 141 | if (null !== $queryParameterString) { |
| 142 | 142 | $queryParameterString .= '&'; |
@@ -206,7 +206,7 @@ |
||
| 206 | 206 | |
| 207 | 207 | $isOk = true; |
| 208 | 208 | $isOk &= $required == $requireResult; |
| 209 | - $isOk &= (null === $this->targType) === (null === $this->foreignFieldName); |
|
| 209 | + $isOk &= (null === $this->targType) === (null === $this->foreignFieldName); |
|
| 210 | 210 | $isOk &= count($this->throughFieldChain) >= 2; |
| 211 | 211 | |
| 212 | 212 | return boolval($isOk); |
@@ -188,8 +188,8 @@ |
||
| 188 | 188 | */ |
| 189 | 189 | protected function updateLightStack(int $newCount): void |
| 190 | 190 | { |
| 191 | - $this->lightStack[$newCount - 1]['count']--; |
|
| 192 | - if (0 == $this->lightStack[$newCount - 1]['count']) { |
|
| 191 | + $this->lightStack[$newCount-1]['count']--; |
|
| 192 | + if (0 == $this->lightStack[$newCount-1]['count']) { |
|
| 193 | 193 | array_pop($this->lightStack); |
| 194 | 194 | } |
| 195 | 195 | } |
@@ -226,10 +226,10 @@ |
||
| 226 | 226 | /** @var array<string, array> */ |
| 227 | 227 | private static $fieldOrderCache = [ |
| 228 | 228 | 'BelongsTo' => ['foreignKey', 'ownerKey'], |
| 229 | - 'BelongsToMany' => ['parentKey','foreignPivotKey','relatedPivotKey','relatedKey'], |
|
| 230 | - 'HasOneOrMany' => ['localKey', 'foreignKey' ], |
|
| 229 | + 'BelongsToMany' => ['parentKey', 'foreignPivotKey', 'relatedPivotKey', 'relatedKey'], |
|
| 230 | + 'HasOneOrMany' => ['localKey', 'foreignKey'], |
|
| 231 | 231 | 'HasManyThrough' => ['localKey', 'firstKey', 'secondLocalKey', 'secondKey'], |
| 232 | - 'MorphToMany' => ['parentKey','foreignPivotKey','morphType', 'relatedPivotKey','relatedKey'], |
|
| 232 | + 'MorphToMany' => ['parentKey', 'foreignPivotKey', 'morphType', 'relatedPivotKey', 'relatedKey'], |
|
| 233 | 233 | 'MorphTo' => ['foreignKey', 'morphType', 'ownerKey'], |
| 234 | 234 | 'MorphOneOrMany' => ['localKey', 'morphType', 'foreignKey'], |
| 235 | 235 | ]; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $fileName = $method->getFileName(); |
| 40 | 40 | |
| 41 | 41 | $file = new SplFileObject($fileName); |
| 42 | - $file->seek($method->getStartLine() - 1); |
|
| 42 | + $file->seek($method->getStartLine()-1); |
|
| 43 | 43 | /** @var string $code */ |
| 44 | 44 | $code = ''; |
| 45 | 45 | while ($file->key() < $method->getEndLine()) { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $code = preg_replace('/\s\s+/', '', $code); |
| 52 | 52 | /** @var int $begin */ |
| 53 | 53 | $begin = strpos($code, 'function('); |
| 54 | - $code = substr($code, (int)$begin, strrpos($code, '}') - $begin + 1); |
|
| 54 | + $code = substr($code, (int) $begin, strrpos($code, '}')-$begin+1); |
|
| 55 | 55 | return $code; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | ) { |
| 92 | 92 | continue; |
| 93 | 93 | } |
| 94 | - $relationships[]= $method; |
|
| 94 | + $relationships[] = $method; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | return $relationships; |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | |
| 117 | 117 | foreach ($this->request->all() as $key => $value) { |
| 118 | 118 | $keyBitz = explode(';', strval($key)); |
| 119 | - $newKey = strtolower($keyBitz[count($keyBitz) - 1]); |
|
| 119 | + $newKey = strtolower($keyBitz[count($keyBitz)-1]); |
|
| 120 | 120 | $this->queryOptions[] = [$newKey => $value]; |
| 121 | 121 | if (!array_key_exists($key, $this->queryOptionsCount)) { |
| 122 | 122 | $this->queryOptionsCount[$newKey] = 0; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $relativeUri = $this->getRequest()->getIdentifier(); |
| 224 | 224 | $absoluteUri = $this->getRequest()->getRequestUrl()->getUrlAsString(); |
| 225 | 225 | |
| 226 | - $selfLink = new ODataLink(); |
|
| 226 | + $selfLink = new ODataLink(); |
|
| 227 | 227 | $selfLink->setName('self'); |
| 228 | 228 | $selfLink->setTitle($relativeUri); |
| 229 | 229 | $selfLink->setUrl($relativeUri); |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | $result = new ODataEntry(); |
| 541 | 541 | $result->resourceSetName = $type->getName(); |
| 542 | 542 | } else { |
| 543 | - $result = new ODataFeed(); |
|
| 543 | + $result = new ODataFeed(); |
|
| 544 | 544 | $result->setSelfLink(new ODataLink(ODataConstants::ATOM_SELF_RELATION_ATTRIBUTE_VALUE)); |
| 545 | 545 | } |
| 546 | 546 | $nuLink->setExpandedResult(new ODataExpandedResult($result)); |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | if ($shouldExpand) { |
| 600 | 600 | $this->expandNavigationProperty($entryObject, $prop, $nuLink, $propKind, $propName); |
| 601 | 601 | } |
| 602 | - $links[] = $nuLink; |
|
| 602 | + $links[] = $nuLink; |
|
| 603 | 603 | } |
| 604 | 604 | return $links; |
| 605 | 605 | } |