Skip to content

Commit

Permalink
Fix issue psalm.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Aug 14, 2023
1 parent 6bf1252 commit 9e69769
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function addUnique(string $table, string $name, array|string $columns): s
return $this->setSql($sql)->requireTableSchemaRefresh($table);
}

public function alterColumn(string $table, string $column, string|ColumnInterface $type): static
public function alterColumn(string $table, string $column, ColumnInterface|string $type): static
{
$sql = $this->getQueryBuilder()->alterColumn($table, $column, $type);
return $this->setSql($sql)->requireTableSchemaRefresh($table);
Expand Down
2 changes: 1 addition & 1 deletion src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function addPrimaryKey(string $table, string $name, array|string $columns
*
* Note: The method will quote the `table` and `column` parameters before using them in the generated SQL.
*/
public function alterColumn(string $table, string $column, string|ColumnInterface $type): static;
public function alterColumn(string $table, string $column, ColumnInterface|string $type): static;

/**
* Creates a batch INSERT command.
Expand Down
3 changes: 2 additions & 1 deletion src/Debug/CommandInterfaceProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Yiisoft\Db\Command\CommandInterface;
use Yiisoft\Db\Query\Data\DataReaderInterface;
use Yiisoft\Db\Query\QueryInterface;
use Yiisoft\Db\Schema\Builder\ColumnInterface;

final class CommandInterfaceProxy implements CommandInterface
{
Expand Down Expand Up @@ -92,7 +93,7 @@ public function addUnique(string $table, string $name, array|string $columns): s
/**
* @psalm-suppress MixedArgument
*/
public function alterColumn(string $table, string $column, string $type): static
public function alterColumn(string $table, string $column, ColumnInterface|string $type): static

Check warning on line 96 in src/Debug/CommandInterfaceProxy.php

View check run for this annotation

Codecov / codecov/patch

src/Debug/CommandInterfaceProxy.php#L96

Added line #L96 was not covered by tests
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}
Expand Down

0 comments on commit 9e69769

Please sign in to comment.