@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts\Adapters; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts\Api; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts\Exceptions; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts\Encoder; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts\Models; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Contracts\Validation; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Schema; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Adapters; |
4 | 4 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Condition joining method. |
52 | 52 | */ |
53 | - public const OR = self::AND + 1; |
|
53 | + public const OR = self:: AND + 1; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @var string |
@@ -465,8 +465,8 @@ discard block |
||
465 | 465 | string $relationshipName, |
466 | 466 | ?iterable $relationshipFilters, |
467 | 467 | ?iterable $relationshipSorts, |
468 | - int $joinIndividuals = self::AND, |
|
469 | - int $joinRelationship = self::AND |
|
468 | + int $joinIndividuals = self:: AND , |
|
469 | + int $joinRelationship = self:: AND |
|
470 | 470 | ): self { |
471 | 471 | $targetAlias = null; |
472 | 472 | |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | $reversePk = $isBelongsTo === true ? |
479 | 479 | $this->getModelSchemas()->getReversePrimaryKey($this->getModelClass(), $relationshipName)[0] : null; |
480 | 480 | |
481 | - $addWith = $joinIndividuals === self::AND ? $this->expr()->andX() : $this->expr()->orX(); |
|
481 | + $addWith = $joinIndividuals === self:: AND ? $this->expr()->andX() : $this->expr()->orX(); |
|
482 | 482 | |
483 | 483 | foreach ($relationshipFilters as $columnName => $operationsWithArgs) { |
484 | 484 | if ($columnName === $reversePk) { |
@@ -498,14 +498,14 @@ discard block |
||
498 | 498 | foreach ($operationsWithArgs as $operation => $arguments) { |
499 | 499 | assert( |
500 | 500 | is_iterable($arguments) === true || is_array($arguments) === true, |
501 | - "Operation arguments are missing for `$columnName` column. " . |
|
501 | + "Operation arguments are missing for `$columnName` column. ". |
|
502 | 502 | 'Use an empty array as an empty argument list.' |
503 | 503 | ); |
504 | 504 | $addWith->add($this->createFilterExpression($fullColumnName, $operation, $arguments)); |
505 | 505 | } |
506 | 506 | |
507 | 507 | if ($addWith->count() > 0) { |
508 | - $joinRelationship === self::AND ? $this->andWhere($addWith) : $this->orWhere($addWith); |
|
508 | + $joinRelationship === self:: AND ? $this->andWhere($addWith) : $this->orWhere($addWith); |
|
509 | 509 | } |
510 | 510 | } |
511 | 511 | } |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | foreach ($operationsWithArgs as $operation => $arguments) { |
647 | 647 | assert( |
648 | 648 | is_iterable($arguments) === true || is_array($arguments) === true, |
649 | - "Operation arguments are missing for `$columnName` column. " . |
|
649 | + "Operation arguments are missing for `$columnName` column. ". |
|
650 | 650 | 'Use an empty array as an empty argument list.' |
651 | 651 | ); |
652 | 652 | $expression->add($this->createFilterExpression($fullColumnName, $operation, $arguments)); |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | { |
700 | 700 | $platform = $this->getConnection()->getDatabasePlatform(); |
701 | 701 | |
702 | - return $platform->quoteSingleIdentifier($tableOrAlias) . '.' . $platform->quoteSingleIdentifier($column); |
|
702 | + return $platform->quoteSingleIdentifier($tableOrAlias).'.'.$platform->quoteSingleIdentifier($column); |
|
703 | 703 | } |
704 | 704 | |
705 | 705 | /** |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | */ |
742 | 742 | public function createAlias(string $tableName): string |
743 | 743 | { |
744 | - $alias = $tableName . (++$this->aliasIdCounter); |
|
744 | + $alias = $tableName.(++$this->aliasIdCounter); |
|
745 | 745 | $this->knownAliases[$tableName] = $alias; |
746 | 746 | |
747 | 747 | return $alias; |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | string $targetColumn |
765 | 765 | ): string { |
766 | 766 | $targetAlias = $this->createAlias($targetTable); |
767 | - $joinCondition = $this->quoteDoubleIdentifier($fromAlias, $fromColumn) . '=' . |
|
767 | + $joinCondition = $this->quoteDoubleIdentifier($fromAlias, $fromColumn).'='. |
|
768 | 768 | $this->quoteDoubleIdentifier($targetAlias, $targetColumn); |
769 | 769 | |
770 | 770 | $this->innerJoin( |
@@ -977,7 +977,7 @@ discard block |
||
977 | 977 | } else { |
978 | 978 | assert( |
979 | 979 | $value !== null, |
980 | - 'It seems you are trying to use `null` with =, >, <, or etc operator. ' . |
|
980 | + 'It seems you are trying to use `null` with =, >, <, or etc operator. '. |
|
981 | 981 | 'Use `is null` or `not null` instead.' |
982 | 982 | ); |
983 | 983 | assert(is_string($value), "Only strings, booleans and integers are supported."); |