@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | - * @param iterable $attributes |
|
163 | + * @param Generator $attributes |
|
164 | 164 | * |
165 | 165 | * @return self |
166 | 166 | * |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | - * @param iterable $attributes |
|
185 | + * @param Generator $attributes |
|
186 | 186 | * |
187 | 187 | * @return self |
188 | 188 | * |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * @param string $modelClass |
206 | 206 | * @param iterable $attributes |
207 | 207 | * |
208 | - * @return iterable |
|
208 | + * @return Generator |
|
209 | 209 | * |
210 | 210 | * @SuppressWarnings(PHPMD.StaticAccess) |
211 | 211 | * |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | /** |
291 | - * @param iterable $filters |
|
291 | + * @param \Limoncello\Flute\Api\iterable|null $filters |
|
292 | 292 | * |
293 | 293 | * @return self |
294 | 294 | * |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | |
302 | 302 | /** |
303 | - * @param iterable $filters |
|
303 | + * @param \Limoncello\Flute\Api\iterable|null $filters |
|
304 | 304 | * |
305 | 305 | * @return self |
306 | 306 | * |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | } |
313 | 313 | |
314 | 314 | /** |
315 | - * @param iterable $filters |
|
315 | + * @param \Limoncello\Flute\Api\iterable|null $filters |
|
316 | 316 | * |
317 | 317 | * @return self |
318 | 318 | * |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | /** |
363 | 363 | * @param string $relationshipName |
364 | - * @param iterable $relationshipFilters |
|
364 | + * @param \Limoncello\Flute\Api\iterable|null $relationshipFilters |
|
365 | 365 | * @param iterable|null $relationshipSorts |
366 | 366 | * |
367 | 367 | * @return self |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | } |
385 | 385 | |
386 | 386 | /** |
387 | - * @param iterable $sortParameters |
|
387 | + * @param \Limoncello\Flute\Api\iterable|null $sortParameters |
|
388 | 388 | * |
389 | 389 | * @return self |
390 | 390 | */ |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | string $relationshipName, |
337 | 337 | iterable $relationshipFilters, |
338 | 338 | ?iterable $relationshipSorts |
339 | - ): self { |
|
339 | + ) : self { |
|
340 | 340 | $joinWith = $this->expr()->andX(); |
341 | 341 | |
342 | 342 | return $this->addRelationshipFiltersAndSorts( |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | string $relationshipName, |
373 | 373 | iterable $relationshipFilters, |
374 | 374 | ?iterable $relationshipSorts |
375 | - ): self { |
|
375 | + ) : self { |
|
376 | 376 | $joinWith = $this->expr()->orX(); |
377 | 377 | |
378 | 378 | return $this->addRelationshipFiltersAndSorts( |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | CompositeExpression $filterLink, |
438 | 438 | iterable $relationshipFilters, |
439 | 439 | ?iterable $relationshipSorts |
440 | - ): self { |
|
440 | + ) : self { |
|
441 | 441 | $relationshipType = $this->getModelSchemes()->getRelationshipType($this->getModelClass(), $relationshipName); |
442 | 442 | switch ($relationshipType) { |
443 | 443 | case RelationshipTypes::BELONGS_TO: |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | CompositeExpression $filterLink, |
513 | 513 | iterable $relationshipFilters, |
514 | 514 | ?iterable $relationshipSorts |
515 | - ): self { |
|
515 | + ) : self { |
|
516 | 516 | $foreignKey = $this->getModelSchemes()->getForeignKey($this->getModelClass(), $relationshipName); |
517 | 517 | list($onePrimaryKey, $oneTable) = |
518 | 518 | $this->getModelSchemes()->getReversePrimaryKey($this->getModelClass(), $relationshipName); |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | CompositeExpression $filterLink, |
549 | 549 | iterable $relationshipFilters, |
550 | 550 | ?iterable $relationshipSorts |
551 | - ): self { |
|
551 | + ) : self { |
|
552 | 552 | $primaryKey = $this->getModelSchemes()->getPrimaryKey($this->getModelClass()); |
553 | 553 | list($manyForeignKey, $manyTable) = |
554 | 554 | $this->getModelSchemes()->getReverseForeignKey($this->getModelClass(), $relationshipName); |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | CompositeExpression $targetFilterLink, |
585 | 585 | iterable $relationshipFilters, |
586 | 586 | ?iterable $relationshipSorts |
587 | - ): self { |
|
587 | + ) : self { |
|
588 | 588 | $primaryKey = $this->getModelSchemes()->getPrimaryKey($this->getModelClass()); |
589 | 589 | list ($intermediateTable, $intermediatePk, $intermediateFk) = |
590 | 590 | $this->getModelSchemes()->getBelongsToManyRelationship($this->getModelClass(), $relationshipName); |
@@ -636,9 +636,9 @@ discard block |
||
636 | 636 | ?CompositeExpression $targetFilterLink, |
637 | 637 | ?iterable $targetFilterParams, |
638 | 638 | ?iterable $relationshipSorts |
639 | - ): string { |
|
639 | + ) : string { |
|
640 | 640 | $targetAlias = $this->createAlias($targetTable); |
641 | - $joinCondition = $this->buildColumnName($fromAlias, $fromColumn) . '=' . |
|
641 | + $joinCondition = $this->buildColumnName($fromAlias, $fromColumn).'='. |
|
642 | 642 | $this->buildColumnName($targetAlias, $targetColumn); |
643 | 643 | |
644 | 644 | $this->innerJoin( |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | ?CompositeExpression $targetFilterLink, |
700 | 700 | ?iterable $targetFilterParams, |
701 | 701 | ?iterable $targetSortParams |
702 | - ): string { |
|
702 | + ) : string { |
|
703 | 703 | $intNoSorting = null; |
704 | 704 | $intAlias = $this->innerJoinOneTable( |
705 | 705 | $fromAlias, |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | $intFilterParams, |
711 | 711 | $intNoSorting |
712 | 712 | ); |
713 | - $targetAlias = $this->innerJoinOneTable( |
|
713 | + $targetAlias = $this->innerJoinOneTable( |
|
714 | 714 | $intAlias, |
715 | 715 | $intToTargetColumn, |
716 | 716 | $targetTable, |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | */ |
731 | 731 | private function createAlias(string $tableName): string |
732 | 732 | { |
733 | - $alias = $tableName . (++$this->aliasIdCounter); |
|
733 | + $alias = $tableName.(++$this->aliasIdCounter); |
|
734 | 734 | $this->knownAliases[$tableName] = $alias; |
735 | 735 | |
736 | 736 | return $alias; |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | if ($this->dtToDbConverter === null) { |
934 | 934 | $type = $this->getDbalType(DateTimeType::DATETIME); |
935 | 935 | $platform = $this->getConnection()->getDatabasePlatform(); |
936 | - $this->dtToDbConverter = function (DateTimeInterface $dateTime) use ($type, $platform) : string { |
|
936 | + $this->dtToDbConverter = function(DateTimeInterface $dateTime) use ($type, $platform) : string { |
|
937 | 937 | return $type->convertToDatabaseValue($dateTime, $platform); |
938 | 938 | }; |
939 | 939 | } |
@@ -959,7 +959,7 @@ discard block |
||
959 | 959 | } else { |
960 | 960 | assert( |
961 | 961 | $value !== null, |
962 | - 'It seems you are trying to use `null` with =, >, <, or etc operator. ' . |
|
962 | + 'It seems you are trying to use `null` with =, >, <, or etc operator. '. |
|
963 | 963 | 'Use `is null` or `not null` instead.' |
964 | 964 | ); |
965 | 965 | assert(is_string($value), "Only strings, booleans and integers are supported."); |
@@ -755,9 +755,9 @@ discard block |
||
755 | 755 | } |
756 | 756 | |
757 | 757 | /** |
758 | - * @param iterable $paths (string[]) |
|
758 | + * @param iterable|null $paths (string[]) |
|
759 | 759 | * |
760 | - * @return iterable |
|
760 | + * @return Generator |
|
761 | 761 | */ |
762 | 762 | private static function getPaths(iterable $paths): iterable |
763 | 763 | { |
@@ -1355,7 +1355,7 @@ discard block |
||
1355 | 1355 | * @param string $modelClass |
1356 | 1356 | * @param string $keyColumnName |
1357 | 1357 | * |
1358 | - * @return iterable |
|
1358 | + * @return Generator |
|
1359 | 1359 | * |
1360 | 1360 | * @throws DBALException |
1361 | 1361 | */ |
@@ -1455,7 +1455,7 @@ discard block |
||
1455 | 1455 | * @param null|string $index |
1456 | 1456 | * @param iterable $attributes |
1457 | 1457 | * |
1458 | - * @return iterable |
|
1458 | + * @return Generator |
|
1459 | 1459 | */ |
1460 | 1460 | protected function filterAttributesOnCreate(?string $index, iterable $attributes): iterable |
1461 | 1461 | { |
@@ -1475,7 +1475,7 @@ discard block |
||
1475 | 1475 | /** |
1476 | 1476 | * @param iterable $attributes |
1477 | 1477 | * |
1478 | - * @return iterable |
|
1478 | + * @return Generator |
|
1479 | 1479 | */ |
1480 | 1480 | protected function filterAttributesOnUpdate(iterable $attributes): iterable |
1481 | 1481 | { |
@@ -1673,10 +1673,10 @@ discard block |
||
1673 | 1673 | |
1674 | 1674 | /** |
1675 | 1675 | * @param iterable $attributes |
1676 | - * @param array $typeNames |
|
1676 | + * @param Type[] $typeNames |
|
1677 | 1677 | * @param AbstractPlatform $platform |
1678 | 1678 | * |
1679 | - * @return iterable |
|
1679 | + * @return Generator |
|
1680 | 1680 | * |
1681 | 1681 | * @throws DBALException |
1682 | 1682 | */ |