Passed
Pull Request — master (#235)
by Alex
05:23
created
src/Models/MetadataTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -369,7 +369,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Serialisers/SerialiseNextPageLinksTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
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 .= '&';
Please login to merge, or discard this patch.
src/Models/ObjectMap/Entities/Associations/AssociationStubBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Serialisers/SerialiseDepWrapperTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,8 +188,8 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Models/ObjectMap/Entities/Associations/AssociationStubFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -226,10 +226,10 @@
 block discarded – undo
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
     ];
Please login to merge, or discard this patch.
src/Models/ModelReflectionHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
91 91
                 ) {
92 92
                     continue;
93 93
                 }
94
-                $relationships[]= $method;
94
+                $relationships[] = $method;
95 95
             }
96 96
         }
97 97
         return $relationships;
Please login to merge, or discard this patch.
src/Query/LaravelReadQuery.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,8 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         /** @var MetadataTrait $model */
73 73
         $model     = $sourceEntityInstance instanceof Model ?
74
-            $sourceEntityInstance :
75
-            $sourceEntityInstance->getRelated();
74
+            $sourceEntityInstance : $sourceEntityInstance->getRelated();
76 75
         $modelLoad = $model->getEagerLoad();
77 76
         $tableName = $model->getTable();
78 77
         $rawLoad   = array_unique(array_merge($rawLoad, $modelLoad));
@@ -384,7 +383,7 @@  discard block
 block discarded – undo
384 383
                     // so we can't bail out early
385 384
                     $rawCount += $results->count();
386 385
                     // now bolt on filtrate to accumulating result set if we haven't accumulated enough bitz
387
-                    if ($rawTop > $resultSet->count() + $skip) {
386
+                    if ($rawTop > $resultSet->count()+$skip) {
388 387
                         $resultSet = collect(array_merge($resultSet->all(), $results->all()));
389 388
                         $sliceAmount = min($skip, $resultSet->count());
390 389
                         $resultSet = $resultSet->slice($sliceAmount);
@@ -456,7 +455,7 @@  discard block
 block discarded – undo
456 455
         if (QueryType::COUNT() == $qVal || QueryType::ENTITIES_WITH_COUNT() == $qVal) {
457 456
             $result->count = $resultCount;
458 457
         }
459
-        $hazMore         = $bulkSetCount > $skip + count($resultSet);
458
+        $hazMore         = $bulkSetCount > $skip+count($resultSet);
460 459
         $result->hasMore = $hazMore;
461 460
     }
462 461
 }
Please login to merge, or discard this patch.
src/Serialisers/SerialiserLowLevelWriters.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
             $subProp                            = new ODataProperty();
56 56
             $subProp->name                      = $corn;
57 57
             $subProp->value                     = isset($flake) ?
58
-                                                    SerialiserLowLevelWriters::primitiveToString($rType, $flake) :
59
-                                                    null;
58
+                                                    SerialiserLowLevelWriters::primitiveToString($rType, $flake) : null;
60 59
             $subProp->typeName                  = $nrp->getResourceType()->getFullName();
61 60
             $propertyContent->properties[$corn] = $subProp;
62 61
         }
Please login to merge, or discard this patch.