Completed
Push — develop ( 48c4f2...a2b4be )
by Neomerx
06:03
created
src/Http/Query/ParametersMapper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -408,7 +408,7 @@
 block discarded – undo
408 408
      * @param string   $parameterName
409 409
      * @param iterable $value
410 410
      *
411
-     * @return iterable
411
+     * @return Generator
412 412
      */
413 413
     private function parseOperationsAndArguments(string $parameterName, iterable $value): iterable
414 414
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     public function getMappedIncludes(): iterable
246 246
     {
247 247
         $fromScheme        = $this->getRootScheme();
248
-        $getMappedRelLinks = function (iterable $links) use ($fromScheme) : iterable {
248
+        $getMappedRelLinks = function(iterable $links) use ($fromScheme) : iterable {
249 249
             foreach ($links as $link) {
250 250
                 assert(is_string($link));
251 251
                 $fromSchemaClass = get_class($fromScheme);
@@ -289,14 +289,14 @@  discard block
 block discarded – undo
289 289
         //     ['rel2_name1', ],
290 290
         //     ['rel3_name1', 'rel3_name2', 'rel3_name3', ],
291 291
         // ]
292
-        $includeAsModelNames = function (iterable $relationships): iterable {
292
+        $includeAsModelNames = function(iterable $relationships): iterable {
293 293
             foreach ($relationships as $relationship) {
294 294
                 assert($relationship instanceof RelationshipInterface);
295 295
                 yield $relationship->getNameInModel();
296 296
             }
297 297
         };
298
-        $mappedIncludes     = $this->getMappedIncludes();
299
-        $getIncludes         = function () use ($mappedIncludes, $includeAsModelNames) : iterable {
298
+        $mappedIncludes = $this->getMappedIncludes();
299
+        $getIncludes = function() use ($mappedIncludes, $includeAsModelNames) : iterable {
300 300
             foreach ($mappedIncludes as $relationships) {
301 301
                 yield $includeAsModelNames($relationships);
302 302
             }
Please login to merge, or discard this patch.
src/Http/Query/QueryParser.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
      * @param string $parameterName
265 265
      * @param array  $value
266 266
      *
267
-     * @return iterable
267
+     * @return Generator
268 268
      */
269 269
     private function parseOperationsAndArguments(string $parameterName, array $value): iterable
270 270
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         // debug check all fields are strings
94 94
         assert(
95
-            (function () use ($fields) {
95
+            (function() use ($fields) {
96 96
                 $allAreStrings = !empty($fields);
97 97
                 foreach ($fields as $field) {
98 98
                     $allAreStrings = $allAreStrings === true && is_string($field) === true && empty($field) === false;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         // debug check all fields are strings
136 136
         assert(
137
-            (function () use ($fields) {
137
+            (function() use ($fields) {
138 138
                 $allAreStrings = !empty($fields);
139 139
                 foreach ($fields as $field) {
140 140
                     $allAreStrings = $allAreStrings === true && is_string($field) === true && empty($field) === false;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     {
177 177
         // debug check all fields are strings
178 178
         assert(
179
-            (function () use ($paths) {
179
+            (function() use ($paths) {
180 180
                 $allAreStrings = !empty($paths);
181 181
                 foreach ($paths as $path) {
182 182
                     $allAreStrings = $allAreStrings === true && is_string($path) === true && empty($path) === false;
Please login to merge, or discard this patch.
src/Package/FluteContainerConfigurator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,22 +49,22 @@  discard block
 block discarded – undo
49 49
 
50 50
         $container[FactoryInterface::class] = $factory;
51 51
 
52
-        $container[JsonSchemesInterface::class] = function (PsrContainerInterface $container) use ($factory) {
52
+        $container[JsonSchemesInterface::class] = function(PsrContainerInterface $container) use ($factory) {
53 53
             $settings     = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
54 54
             $modelSchemes = $container->get(ModelSchemeInfoInterface::class);
55 55
 
56 56
             return $factory->createJsonSchemes($settings[FluteSettings::KEY_MODEL_TO_SCHEME_MAP], $modelSchemes);
57 57
         };
58 58
 
59
-        $container[QueryParserInterface::class] = function (PsrContainerInterface $container) {
59
+        $container[QueryParserInterface::class] = function(PsrContainerInterface $container) {
60 60
             return new QueryParser($container->get(PaginationStrategyInterface::class));
61 61
         };
62 62
 
63
-        $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) {
63
+        $container[ParametersMapperInterface::class] = function(PsrContainerInterface $container) {
64 64
             return new ParametersMapper($container->get(JsonSchemesInterface::class));
65 65
         };
66 66
 
67
-        $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) {
67
+        $container[EncoderInterface::class] = function(PsrContainerInterface $container) use ($factory) {
68 68
             /** @var JsonSchemesInterface $jsonSchemes */
69 69
             $jsonSchemes = $container->get(JsonSchemesInterface::class);
70 70
             $settings    = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             return $encoder;
80 80
         };
81 81
 
82
-        $container[PaginationStrategyInterface::class] = function (PsrContainerInterface $container) {
82
+        $container[PaginationStrategyInterface::class] = function(PsrContainerInterface $container) {
83 83
             $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
84 84
 
85 85
             return new PaginationStrategy(
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             );
89 89
         };
90 90
 
91
-        $container[JsonApiValidatorFactoryInterface::class] = function (PsrContainerInterface $container) {
91
+        $container[JsonApiValidatorFactoryInterface::class] = function(PsrContainerInterface $container) {
92 92
             $factory = new JsonApiValidatorFactory($container);
93 93
 
94 94
             return $factory;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public static function configureExceptionHandler(LimoncelloContainerInterface $container)
118 118
     {
119
-        $container[ThrowableHandlerInterface::class] = function (PsrContainerInterface $container) {
119
+        $container[ThrowableHandlerInterface::class] = function(PsrContainerInterface $container) {
120 120
             $appSettings   = $container->get(SettingsProviderInterface::class)->get(A::class);
121 121
             $fluteSettings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
122 122
 
Please login to merge, or discard this patch.
src/Adapters/ModelQueryBuilder.php 2 patches
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     }
129 129
 
130 130
     /**
131
-     * @param iterable $attributes
131
+     * @param Generator $attributes
132 132
      *
133 133
      * @return self
134 134
      *
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     }
149 149
 
150 150
     /**
151
-     * @param iterable $attributes
151
+     * @param Generator $attributes
152 152
      *
153 153
      * @return self
154 154
      *
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * @param string   $modelClass
170 170
      * @param iterable $attributes
171 171
      *
172
-     * @return iterable
172
+     * @return Generator
173 173
      *
174 174
      * @SuppressWarnings(PHPMD.StaticAccess)
175 175
      */
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     }
250 250
 
251 251
     /**
252
-     * @param iterable $filters
252
+     * @param \Limoncello\Flute\Api\iterable|null $filters
253 253
      *
254 254
      * @return self
255 255
      */
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     }
260 260
 
261 261
     /**
262
-     * @param iterable $filters
262
+     * @param \Limoncello\Flute\Api\iterable|null $filters
263 263
      *
264 264
      * @return self
265 265
      */
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     }
270 270
 
271 271
     /**
272
-     * @param iterable $filters
272
+     * @param \Limoncello\Flute\Api\iterable|null $filters
273 273
      *
274 274
      * @return self
275 275
      */
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
     /**
316 316
      * @param string        $relationshipName
317
-     * @param iterable      $relationshipFilters
317
+     * @param \Limoncello\Flute\Api\iterable|null      $relationshipFilters
318 318
      * @param iterable|null $relationshipSorts
319 319
      *
320 320
      * @return self
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
     }
336 336
 
337 337
     /**
338
-     * @param iterable $sortParameters
338
+     * @param \Limoncello\Flute\Api\iterable|null $sortParameters
339 339
      *
340 340
      * @return self
341 341
      */
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         string $relationshipName,
290 290
         iterable $relationshipFilters,
291 291
         ?iterable $relationshipSorts
292
-    ): self {
292
+    ) : self {
293 293
         $joinWith = $this->expr()->andX();
294 294
 
295 295
         return $this->addRelationshipFiltersAndSorts(
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         string $relationshipName,
324 324
         iterable $relationshipFilters,
325 325
         ?iterable $relationshipSorts
326
-    ): self {
326
+    ) : self {
327 327
         $joinWith = $this->expr()->orX();
328 328
 
329 329
         return $this->addRelationshipFiltersAndSorts(
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         CompositeExpression $filterLink,
387 387
         iterable $relationshipFilters,
388 388
         ?iterable $relationshipSorts
389
-    ): self {
389
+    ) : self {
390 390
         $relationshipType = $this->getModelSchemes()->getRelationshipType($this->getModelClass(), $relationshipName);
391 391
         switch ($relationshipType) {
392 392
             case RelationshipTypes::BELONGS_TO:
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         CompositeExpression $filterLink,
460 460
         iterable $relationshipFilters,
461 461
         ?iterable $relationshipSorts
462
-    ): self {
462
+    ) : self {
463 463
         $foreignKey = $this->getModelSchemes()->getForeignKey($this->getModelClass(), $relationshipName);
464 464
         list($onePrimaryKey, $oneTable) =
465 465
             $this->getModelSchemes()->getReversePrimaryKey($this->getModelClass(), $relationshipName);
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
         CompositeExpression $filterLink,
492 492
         iterable $relationshipFilters,
493 493
         ?iterable $relationshipSorts
494
-    ): self {
494
+    ) : self {
495 495
         $primaryKey = $this->getModelSchemes()->getPrimaryKey($this->getModelClass());
496 496
         list($manyForeignKey, $manyTable) =
497 497
             $this->getModelSchemes()->getReverseForeignKey($this->getModelClass(), $relationshipName);
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
         CompositeExpression $targetFilterLink,
524 524
         iterable $relationshipFilters,
525 525
         ?iterable $relationshipSorts
526
-    ): self {
526
+    ) : self {
527 527
         $primaryKey = $this->getModelSchemes()->getPrimaryKey($this->getModelClass());
528 528
         list ($intermediateTable, $intermediatePk, $intermediateFk) =
529 529
             $this->getModelSchemes()->getBelongsToManyRelationship($this->getModelClass(), $relationshipName);
@@ -571,9 +571,9 @@  discard block
 block discarded – undo
571 571
         ?CompositeExpression $targetFilterLink,
572 572
         ?iterable $targetFilterParams,
573 573
         ?iterable $relationshipSorts
574
-    ): string {
574
+    ) : string {
575 575
         $targetAlias   = $this->createAlias($targetTable);
576
-        $joinCondition = $this->buildColumnName($fromAlias, $fromColumn) . '=' .
576
+        $joinCondition = $this->buildColumnName($fromAlias, $fromColumn).'='.
577 577
             $this->buildColumnName($targetAlias, $targetColumn);
578 578
 
579 579
         $this->innerJoin(
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
         ?CompositeExpression $targetFilterLink,
633 633
         ?iterable $targetFilterParams,
634 634
         ?iterable $targetSortParams
635
-    ): string {
635
+    ) : string {
636 636
         $intNoSorting = null;
637 637
         $intAlias     = $this->innerJoinOneTable(
638 638
             $fromAlias,
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
             $intFilterParams,
644 644
             $intNoSorting
645 645
         );
646
-        $targetAlias  = $this->innerJoinOneTable(
646
+        $targetAlias = $this->innerJoinOneTable(
647 647
             $intAlias,
648 648
             $intToTargetColumn,
649 649
             $targetTable,
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
      */
664 664
     private function createAlias(string $tableName): string
665 665
     {
666
-        $alias                          = $tableName . (++$this->aliasIdCounter);
666
+        $alias                          = $tableName.(++$this->aliasIdCounter);
667 667
         $this->knownAliases[$tableName] = $alias;
668 668
 
669 669
         return $alias;
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
         } else {
828 828
             assert(
829 829
                 $value !== null,
830
-                'It seems you are trying to use `null` with =, >, <, or etc operator. ' .
830
+                'It seems you are trying to use `null` with =, >, <, or etc operator. '.
831 831
                 'Use `is null` or `not null` instead.'
832 832
             );
833 833
             assert(is_string($value), "Only strings, booleans and integers are supported.");
Please login to merge, or discard this patch.
src/Api/Crud.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -616,9 +616,9 @@  discard block
 block discarded – undo
616 616
     }
617 617
 
618 618
     /**
619
-     * @param iterable $paths (string[])
619
+     * @param iterable|null $paths (string[])
620 620
      *
621
-     * @return iterable
621
+     * @return Generator
622 622
      */
623 623
     private static function getPaths(iterable $paths): iterable
624 624
     {
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
      * @param null|string $index
1231 1231
      * @param iterable    $attributes
1232 1232
      *
1233
-     * @return iterable
1233
+     * @return Generator
1234 1234
      */
1235 1235
     protected function filterAttributesOnCreate(?string $index, iterable $attributes): iterable
1236 1236
     {
@@ -1250,7 +1250,7 @@  discard block
 block discarded – undo
1250 1250
     /**
1251 1251
      * @param iterable $attributes
1252 1252
      *
1253
-     * @return iterable
1253
+     * @return Generator
1254 1254
      */
1255 1255
     protected function filterAttributesOnUpdate(iterable $attributes): iterable
1256 1256
     {
@@ -1422,10 +1422,10 @@  discard block
 block discarded – undo
1422 1422
 
1423 1423
     /**
1424 1424
      * @param iterable         $attributes
1425
-     * @param array            $typeNames
1425
+     * @param Type[]            $typeNames
1426 1426
      * @param AbstractPlatform $platform
1427 1427
      *
1428
-     * @return iterable
1428
+     * @return Generator
1429 1429
      */
1430 1430
     private function readTypedAttributes(iterable $attributes, array $typeNames, AbstractPlatform $platform): iterable
1431 1431
     {
Please login to merge, or discard this patch.
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
                 assert(is_string($pathPiece));
675 675
                 $parent                    = $tmpPath;
676 676
                 $tmpPath                   = empty($tmpPath) === true ?
677
-                    $pathPiece : $tmpPath . static::PATH_SEPARATOR . $pathPiece;
677
+                    $pathPiece : $tmpPath.static::PATH_SEPARATOR.$pathPiece;
678 678
                 $normalizedPaths[$tmpPath] = [$parent, $pathPiece];
679 679
                 $pathsDepths[$parent]      = $parentDepth++;
680 680
             }
@@ -842,8 +842,7 @@  discard block
 block discarded – undo
842 842
             $filters = $this->getFilters();
843 843
             $sorts   = $this->getSorts();
844 844
             $this->areFiltersWithAnd() ?
845
-                $builder->addRelationshipFiltersAndSortsWithAnd($reverseRelName, $filters, $sorts) :
846
-                $builder->addRelationshipFiltersAndSortsWithOr($reverseRelName, $filters, $sorts);
845
+                $builder->addRelationshipFiltersAndSortsWithAnd($reverseRelName, $filters, $sorts) : $builder->addRelationshipFiltersAndSortsWithOr($reverseRelName, $filters, $sorts);
847 846
         }
848 847
         // ... and the input filters to actual data we select
849 848
         if ($relationshipFilters !== null) {
@@ -962,7 +961,7 @@  discard block
 block discarded – undo
962 961
 
963 962
         $this->clearFetchParameters();
964 963
 
965
-        return (int)$deleted;
964
+        return (int) $deleted;
966 965
     }
967 966
 
968 967
     /**
@@ -991,7 +990,7 @@  discard block
 block discarded – undo
991 990
 
992 991
         $this->clearBuilderParameters()->clearFetchParameters();
993 992
 
994
-        $this->inTransaction(function () use ($saveMain, $toMany, &$index) {
993
+        $this->inTransaction(function() use ($saveMain, $toMany, &$index) {
995 994
             $saveMain->execute();
996 995
 
997 996
             // if no index given will use last insert ID as index
@@ -1007,7 +1006,7 @@  discard block
 block discarded – undo
1007 1006
                         ->prepareCreateInToManyRelationship($relationshipName, $index, $secondaryIdBindName)
1008 1007
                 );
1009 1008
                 foreach ($secondaryIds as $secondaryId) {
1010
-                    $inserted += (int)$saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute();
1009
+                    $inserted += (int) $saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute();
1011 1010
                 }
1012 1011
             }
1013 1012
         });
@@ -1036,12 +1035,12 @@  discard block
 block discarded – undo
1036 1035
             ->createBuilder($this->getModelClass())
1037 1036
             ->updateModels($allowedChanges)
1038 1037
             ->addFiltersWithAndToTable($filters);
1039
-        $saveMain       = $this->builderSaveResourceOnUpdate($saveMain);
1038
+        $saveMain = $this->builderSaveResourceOnUpdate($saveMain);
1040 1039
         $saveMain->getSQL(); // prepare
1041 1040
 
1042 1041
         $this->clearBuilderParameters()->clearFetchParameters();
1043 1042
 
1044
-        $this->inTransaction(function () use ($saveMain, $toMany, $index, &$updated) {
1043
+        $this->inTransaction(function() use ($saveMain, $toMany, $index, &$updated) {
1045 1044
             $updated = $saveMain->execute();
1046 1045
 
1047 1046
             foreach ($toMany as $relationshipName => $secondaryIds) {
@@ -1061,12 +1060,12 @@  discard block
 block discarded – undo
1061 1060
                         ->prepareCreateInToManyRelationship($relationshipName, $index, $secondaryIdBindName)
1062 1061
                 );
1063 1062
                 foreach ($secondaryIds as $secondaryId) {
1064
-                    $updated += (int)$saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute();
1063
+                    $updated += (int) $saveToMany->setParameter($secondaryIdBindName, $secondaryId)->execute();
1065 1064
                 }
1066 1065
             }
1067 1066
         });
1068 1067
 
1069
-        return (int)$updated;
1068
+        return (int) $updated;
1070 1069
     }
1071 1070
 
1072 1071
     /**
@@ -1150,7 +1149,7 @@  discard block
 block discarded – undo
1150 1149
     /**
1151 1150
      * @inheritdoc
1152 1151
      */
1153
-    public function fetchRow(QueryBuilder $builder, string $modelClass): ?array
1152
+    public function fetchRow(QueryBuilder $builder, string $modelClass): ? array
1154 1153
     {
1155 1154
         $model = null;
1156 1155
 
@@ -1300,7 +1299,7 @@  discard block
 block discarded – undo
1300 1299
      *
1301 1300
      * @return iterable
1302 1301
      */
1303
-    protected function filterAttributesOnCreate(?string $index, iterable $attributes): iterable
1302
+    protected function filterAttributesOnCreate(?string $index, iterable $attributes) : iterable
1304 1303
     {
1305 1304
         if ($index !== null) {
1306 1305
             $pkName = $this->getModelSchemes()->getPrimaryKey($this->getModelClass());
@@ -1359,7 +1358,7 @@  discard block
 block discarded – undo
1359 1358
         $pkName = $this->getModelSchemes()->getPrimaryKey($parentClass);
1360 1359
 
1361 1360
         foreach ($childRelationships as $name) {
1362
-            $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath . static::PATH_SEPARATOR . $name : $name;
1361
+            $childrenPath = $parentsPath !== static::ROOT_PATH ? $parentsPath.static::PATH_SEPARATOR.$name : $name;
1363 1362
 
1364 1363
             $relationshipType = $this->getModelSchemes()->getRelationshipType($parentClass, $name);
1365 1364
             list ($targetModelClass, $reverseRelName) =
@@ -1380,7 +1379,7 @@  discard block
 block discarded – undo
1380 1379
                             [$pkName => [FilterParameterInterface::OPERATION_EQUALS => [$parent->{$pkName}]]],
1381 1380
                             []
1382 1381
                         );
1383
-                        $child         = $deDup->register($this->fetchResourceWithoutRelationships(
1382
+                        $child = $deDup->register($this->fetchResourceWithoutRelationships(
1384 1383
                             $clonedBuilder,
1385 1384
                             $clonedBuilder->getModelClass()
1386 1385
                         ));
@@ -1401,7 +1400,7 @@  discard block
 block discarded – undo
1401 1400
                             [$pkName => [FilterParameterInterface::OPERATION_EQUALS => [$parent->{$pkName}]]],
1402 1401
                             []
1403 1402
                         );
1404
-                        $children      = $this->fetchPaginatedResourcesWithoutRelationships(
1403
+                        $children = $this->fetchPaginatedResourcesWithoutRelationships(
1405 1404
                             $clonedBuilder,
1406 1405
                             $clonedBuilder->getModelClass()
1407 1406
                         );
Please login to merge, or discard this patch.
src/Contracts/Api/CrudInterface.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
      *
122 122
      * @return array|null
123 123
      */
124
-    public function fetchRow(QueryBuilder $builder, string $modelClass): ?array;
124
+    public function fetchRow(QueryBuilder $builder, string $modelClass): ? array;
125 125
 
126 126
     /**
127 127
      * @param QueryBuilder $builder
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function fetchResources(QueryBuilder $builder, string $modelClass): PaginatedDataInterface;
109 109
 
110 110
     /**
111
-     * @param QueryBuilder|null $builder
111
+     * @param QueryBuilder $builder
112 112
      * @param string|null       $modelClass
113 113
      *
114 114
      * @return mixed|null
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      * @param string       $modelClass
129 129
      * @param string       $columnName
130 130
      *
131
-     * @return iterable
131
+     * @return \Generator
132 132
      */
133 133
     public function fetchColumn(QueryBuilder $builder, string $modelClass, string $columnName): iterable;
134 134
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     ): array;
212 212
 
213 213
     /**
214
-     * @param int|string    $index
214
+     * @param string    $index
215 215
      * @param string        $name
216 216
      * @param iterable|null $relationshipFilters
217 217
      * @param iterable|null $relationshipSorts
Please login to merge, or discard this patch.
src/Http/BaseController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     protected static function readJsonFromRequest(ContainerInterface $container, ServerRequestInterface $request): array
242 242
     {
243
-        $body = (string)$request->getBody();
243
+        $body = (string) $request->getBody();
244 244
         if (empty($body) === true || ($json = json_decode($body, true)) === null) {
245 245
             /** @var FactoryInterface $factory */
246 246
             $factory = $container->get(FactoryInterface::class);
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     {
384 384
         assert(
385 385
             empty(static::ON_CREATE_VALIDATION_RULES_SET_CLASS) === false,
386
-            'Validation rules set should be defined for class ' . static::class . '.'
386
+            'Validation rules set should be defined for class '.static::class.'.'
387 387
         );
388 388
 
389 389
         return static::createJsonApiValidator($container, static::ON_CREATE_VALIDATION_RULES_SET_CLASS);
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     {
399 399
         assert(
400 400
             empty(static::ON_UPDATE_VALIDATION_RULES_SET_CLASS) === false,
401
-            'Validation rules set should be defined for class ' . static::class . '.'
401
+            'Validation rules set should be defined for class '.static::class.'.'
402 402
         );
403 403
 
404 404
         return static::createJsonApiValidator($container, static::ON_UPDATE_VALIDATION_RULES_SET_CLASS);
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
         ContainerInterface $container,
607 607
         ServerRequestInterface $request
608 608
     ): array {
609
-        $jsonData  = static::normalizeIndexValueOnUpdate(
609
+        $jsonData = static::normalizeIndexValueOnUpdate(
610 610
             $routeParams,
611 611
             $container,
612 612
             static::readJsonFromRequest($container, $request)
Please login to merge, or discard this patch.