Completed
Push — master ( 697864...c1ef57 )
by Neomerx
09:24
created
src/Adapters/ModelQueryBuilder.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     }
218 218
 
219 219
     /**
220
-     * @param iterable $attributes
220
+     * @param \Generator $attributes
221 221
      *
222 222
      * @return self
223 223
      *
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     }
240 240
 
241 241
     /**
242
-     * @param iterable $attributes
242
+     * @param \Generator $attributes
243 243
      *
244 244
      * @return self
245 245
      *
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      * @param string   $modelClass
263 263
      * @param iterable $attributes
264 264
      *
265
-     * @return iterable
265
+     * @return \Generator
266 266
      *
267 267
      * @SuppressWarnings(PHPMD.StaticAccess)
268 268
      *
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     }
398 398
 
399 399
     /**
400
-     * @param iterable $filters
400
+     * @param \Limoncello\Flute\Api\iterable|null $filters
401 401
      *
402 402
      * @return self
403 403
      *
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
     }
414 414
 
415 415
     /**
416
-     * @param iterable $filters
416
+     * @param \Limoncello\Flute\Api\iterable|null $filters
417 417
      *
418 418
      * @return self
419 419
      *
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
     }
430 430
 
431 431
     /**
432
-     * @param iterable $filters
432
+     * @param \Limoncello\Flute\Api\iterable|null $filters
433 433
      *
434 434
      * @return self
435 435
      *
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
     }
524 524
 
525 525
     /**
526
-     * @param iterable $sortParameters
526
+     * @param \Limoncello\Flute\Api\iterable|null $sortParameters
527 527
      *
528 528
      * @return self
529 529
      *
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * Condition joining method.
50 50
      */
51
-    public const OR = self::AND + 1;
51
+    public const OR = self:: AND + 1;
52 52
 
53 53
     /**
54 54
      * @var string
@@ -463,8 +463,8 @@  discard block
 block discarded – undo
463 463
         string $relationshipName,
464 464
         ?iterable $relationshipFilters,
465 465
         ?iterable $relationshipSorts,
466
-        int $joinIndividuals = self::AND,
467
-        int $joinRelationship = self::AND
466
+        int $joinIndividuals = self:: AND ,
467
+        int $joinRelationship = self:: AND
468 468
     ): self {
469 469
         $targetAlias = null;
470 470
 
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
             $reversePk = $isBelongsTo === true ?
477 477
                 $this->getModelSchemas()->getReversePrimaryKey($this->getModelClass(), $relationshipName)[0] : null;
478 478
 
479
-            $addWith = $joinIndividuals === self::AND ? $this->expr()->andX() : $this->expr()->orX();
479
+            $addWith = $joinIndividuals === self:: AND ? $this->expr()->andX() : $this->expr()->orX();
480 480
 
481 481
             foreach ($relationshipFilters as $columnName => $operationsWithArgs) {
482 482
                 if ($columnName === $reversePk) {
@@ -496,14 +496,14 @@  discard block
 block discarded – undo
496 496
                 foreach ($operationsWithArgs as $operation => $arguments) {
497 497
                     assert(
498 498
                         is_iterable($arguments) === true || is_array($arguments) === true,
499
-                        "Operation arguments are missing for `$columnName` column. " .
499
+                        "Operation arguments are missing for `$columnName` column. ".
500 500
                         'Use an empty array as an empty argument list.'
501 501
                     );
502 502
                     $addWith->add($this->createFilterExpression($fullColumnName, $operation, $arguments));
503 503
                 }
504 504
 
505 505
                 if ($addWith->count() > 0) {
506
-                    $joinRelationship === self::AND ? $this->andWhere($addWith) : $this->orWhere($addWith);
506
+                    $joinRelationship === self:: AND ? $this->andWhere($addWith) : $this->orWhere($addWith);
507 507
                 }
508 508
             }
509 509
         }
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
             foreach ($operationsWithArgs as $operation => $arguments) {
645 645
                 assert(
646 646
                     is_iterable($arguments) === true || is_array($arguments) === true,
647
-                    "Operation arguments are missing for `$columnName` column. " .
647
+                    "Operation arguments are missing for `$columnName` column. ".
648 648
                     'Use an empty array as an empty argument list.'
649 649
                 );
650 650
                 $expression->add($this->createFilterExpression($fullColumnName, $operation, $arguments));
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
     {
698 698
         $platform = $this->getConnection()->getDatabasePlatform();
699 699
 
700
-        return $platform->quoteSingleIdentifier($tableOrAlias) . '.' . $platform->quoteSingleIdentifier($column);
700
+        return $platform->quoteSingleIdentifier($tableOrAlias).'.'.$platform->quoteSingleIdentifier($column);
701 701
     }
702 702
 
703 703
     /**
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
      */
740 740
     public function createAlias(string $tableName): string
741 741
     {
742
-        $alias                          = $tableName . (++$this->aliasIdCounter);
742
+        $alias                          = $tableName.(++$this->aliasIdCounter);
743 743
         $this->knownAliases[$tableName] = $alias;
744 744
 
745 745
         return $alias;
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
         string $targetColumn
763 763
     ): string {
764 764
         $targetAlias   = $this->createAlias($targetTable);
765
-        $joinCondition = $this->quoteDoubleIdentifier($fromAlias, $fromColumn) . '=' .
765
+        $joinCondition = $this->quoteDoubleIdentifier($fromAlias, $fromColumn).'='.
766 766
             $this->quoteDoubleIdentifier($targetAlias, $targetColumn);
767 767
 
768 768
         $this->innerJoin(
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
         } else {
976 976
             assert(
977 977
                 $value !== null,
978
-                'It seems you are trying to use `null` with =, >, <, or etc operator. ' .
978
+                'It seems you are trying to use `null` with =, >, <, or etc operator. '.
979 979
                 'Use `is null` or `not null` instead.'
980 980
             );
981 981
             assert(is_string($value), "Only strings, booleans and integers are supported.");
Please login to merge, or discard this patch.