@@ -48,7 +48,7 @@ discard block |
||
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 |
@@ -419,8 +419,8 @@ discard block |
||
419 | 419 | string $relationshipName, |
420 | 420 | ?iterable $relationshipFilters, |
421 | 421 | ?iterable $relationshipSorts, |
422 | - int $joinIndividuals = self::AND, |
|
423 | - int $joinRelationship = self::AND |
|
422 | + int $joinIndividuals = self:: AND , |
|
423 | + int $joinRelationship = self:: AND |
|
424 | 424 | ): self { |
425 | 425 | $targetAlias = null; |
426 | 426 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | $reversePk = $isBelongsTo === true ? |
433 | 433 | $this->getModelSchemas()->getReversePrimaryKey($this->getModelClass(), $relationshipName)[0] : null; |
434 | 434 | |
435 | - $addWith = $joinIndividuals === self::AND ? $this->expr()->andX() : $this->expr()->orX(); |
|
435 | + $addWith = $joinIndividuals === self:: AND ? $this->expr()->andX() : $this->expr()->orX(); |
|
436 | 436 | |
437 | 437 | foreach ($relationshipFilters as $columnName => $operationsWithArgs) { |
438 | 438 | if ($columnName === $reversePk) { |
@@ -451,14 +451,14 @@ discard block |
||
451 | 451 | foreach ($operationsWithArgs as $operation => $arguments) { |
452 | 452 | assert( |
453 | 453 | is_iterable($arguments) === true || is_array($arguments) === true, |
454 | - "Operation arguments are missing for `$columnName` column. " . |
|
454 | + "Operation arguments are missing for `$columnName` column. ". |
|
455 | 455 | 'Use an empty array as an empty argument list.' |
456 | 456 | ); |
457 | 457 | $addWith->add($this->createFilterExpression($fullColumnName, $operation, $arguments)); |
458 | 458 | } |
459 | 459 | |
460 | 460 | if ($addWith->count() > 0) { |
461 | - $joinRelationship === self::AND ? $this->andWhere($addWith) : $this->orWhere($addWith); |
|
461 | + $joinRelationship === self:: AND ? $this->andWhere($addWith) : $this->orWhere($addWith); |
|
462 | 462 | } |
463 | 463 | } |
464 | 464 | } |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | foreach ($operationsWithArgs as $operation => $arguments) { |
593 | 593 | assert( |
594 | 594 | is_iterable($arguments) === true || is_array($arguments) === true, |
595 | - "Operation arguments are missing for `$columnName` column. " . |
|
595 | + "Operation arguments are missing for `$columnName` column. ". |
|
596 | 596 | 'Use an empty array as an empty argument list.' |
597 | 597 | ); |
598 | 598 | $expression->add($this->createFilterExpression($fullColumnName, $operation, $arguments)); |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | */ |
628 | 628 | public function buildColumnName(string $table, string $column): string |
629 | 629 | { |
630 | - return $this->quoteTableName($table) . '.' . $this->quoteColumnName($column); |
|
630 | + return $this->quoteTableName($table).'.'.$this->quoteColumnName($column); |
|
631 | 631 | } |
632 | 632 | |
633 | 633 | /** |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | */ |
670 | 670 | public function createAlias(string $tableName): string |
671 | 671 | { |
672 | - $alias = $tableName . (++$this->aliasIdCounter); |
|
672 | + $alias = $tableName.(++$this->aliasIdCounter); |
|
673 | 673 | $this->knownAliases[$tableName] = $alias; |
674 | 674 | |
675 | 675 | return $alias; |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | string $targetColumn |
724 | 724 | ): string { |
725 | 725 | $targetAlias = $this->createAlias($targetTable); |
726 | - $joinCondition = $this->buildColumnName($fromAlias, $fromColumn) . '=' . |
|
726 | + $joinCondition = $this->buildColumnName($fromAlias, $fromColumn).'='. |
|
727 | 727 | $this->buildColumnName($targetAlias, $targetColumn); |
728 | 728 | |
729 | 729 | $this->innerJoin( |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | } else { |
922 | 922 | assert( |
923 | 923 | $value !== null, |
924 | - 'It seems you are trying to use `null` with =, >, <, or etc operator. ' . |
|
924 | + 'It seems you are trying to use `null` with =, >, <, or etc operator. '. |
|
925 | 925 | 'Use `is null` or `not null` instead.' |
926 | 926 | ); |
927 | 927 | assert(is_string($value), "Only strings, booleans and integers are supported."); |