@@ -369,7 +369,7 @@ |
||
369 | 369 | $builder = $connect->getSchemaBuilder(); |
370 | 370 | $columns = $builder->getColumnListing($table); |
371 | 371 | |
372 | - self::$tableColumns = (array)$columns; |
|
372 | + self::$tableColumns = (array) $columns; |
|
373 | 373 | } |
374 | 374 | return self::$tableColumns; |
375 | 375 | } |
@@ -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 | } |
@@ -35,6 +35,6 @@ |
||
35 | 35 | public function getRelationships() |
36 | 36 | { |
37 | 37 | return self::$relationNames = self::$relationNames ?? |
38 | - ModelReflectionHelper::getRelationshipsFromMethods(/* @scrutinizer ignore-type */$this); |
|
38 | + ModelReflectionHelper::getRelationshipsFromMethods(/* @scrutinizer ignore-type */$this); |
|
39 | 39 | } |
40 | 40 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $targClass = $resourceType->getInstanceType()->getName(); |
129 | 129 | if (!($res instanceof $targClass)) { |
130 | 130 | $msg = 'Object being serialised not instance of expected class, ' |
131 | - . $targClass . ', is actually ' . $payloadClass; |
|
131 | + . $targClass . ', is actually ' . $payloadClass; |
|
132 | 132 | throw new InvalidOperationException($msg); |
133 | 133 | } |
134 | 134 | |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | if (!(ResourcePropertyKind::RESOURCESET_REFERENCE == $propKind |
573 | 573 | || ResourcePropertyKind::RESOURCE_REFERENCE == $propKind)) { |
574 | 574 | $msg = '$propKind != ResourcePropertyKind::RESOURCESET_REFERENCE &&' |
575 | - . ' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'; |
|
575 | + . ' $propKind != ResourcePropertyKind::RESOURCE_REFERENCE'; |
|
576 | 576 | throw new InvalidOperationException($msg); |
577 | 577 | } |
578 | 578 | $propTail = ResourcePropertyKind::RESOURCE_REFERENCE == $propKind ? 'entry' : 'feed'; |
@@ -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 .= '&'; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $fileName = $method->getFileName(); |
36 | 36 | |
37 | 37 | $file = new SplFileObject($fileName); |
38 | - $file->seek($method->getStartLine() - 1); |
|
38 | + $file->seek($method->getStartLine()-1); |
|
39 | 39 | $code = ''; |
40 | 40 | while ($file->key() < $method->getEndLine()) { |
41 | 41 | $code .= $file->current(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $code = preg_replace('/\s\s+/', '', $code); |
46 | 46 | $begin = strpos($code, 'function('); |
47 | - $code = substr($code, (int)$begin, strrpos($code, '}') - $begin + 1); |
|
47 | + $code = substr($code, (int) $begin, strrpos($code, '}')-$begin+1); |
|
48 | 48 | return $code; |
49 | 49 | } |
50 | 50 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ) { |
85 | 85 | continue; |
86 | 86 | } |
87 | - $relationships[]= $method; |
|
87 | + $relationships[] = $method; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | return $relationships; |
@@ -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 | ]; |