Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply rector on PHP 8.1 update #867

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
Expand All @@ -19,11 +20,12 @@

// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_80,
LevelSetList::UP_TO_PHP_81,
]);

$rectorConfig->skip([
ClosureToArrowFunctionRector::class,
JsonThrowOnErrorRector::class,
ReadOnlyPropertyRector::class,
NullToStrictStringFuncCallArgRector::class,
]);
};
78 changes: 39 additions & 39 deletions src/Debug/CommandInterfaceProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,47 @@ public function __construct(
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addCheck(string $table, string $name, string $expression): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addColumn(string $table, string $column, ColumnInterface|string $type): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addCommentOnColumn(string $table, string $column, string $comment): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addCommentOnTable(string $table, string $comment): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addDefaultValue(string $table, string $name, string $column, mixed $value): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addForeignKey(
string $table,
Expand All @@ -75,39 +75,39 @@ public function addForeignKey(
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addPrimaryKey(string $table, string $name, array|string $columns): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function addUnique(string $table, string $name, array|string $columns): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function alterColumn(string $table, string $column, ColumnInterface|string $type): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function insertBatch(string $table, iterable $rows, array $columns = []): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function bindParam(
int|string $name,
Expand All @@ -120,15 +120,15 @@ public function bindParam(
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function bindValue(int|string $name, mixed $value, int $dataType = null): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function bindValues(array $values): static
{
Expand All @@ -141,15 +141,15 @@ public function cancel(): void
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function checkIntegrity(string $schema, string $table, bool $check = true): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function createIndex(
string $table,
Expand All @@ -162,111 +162,111 @@ public function createIndex(
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function createTable(string $table, array $columns, string $options = null): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function createView(string $viewName, QueryInterface|string $subQuery): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function delete(string $table, array|string $condition = '', array $params = []): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropCheck(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropColumn(string $table, string $column): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropCommentFromColumn(string $table, string $column): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropCommentFromTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropDefaultValue(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropForeignKey(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropIndex(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropPrimaryKey(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropUnique(string $table, string $name): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function dropView(string $viewName): static
{
Expand Down Expand Up @@ -308,7 +308,7 @@ public function getSql(): string
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function insert(string $table, QueryInterface|array $columns): static
{
Expand Down Expand Up @@ -425,71 +425,71 @@ public function queryScalar(): bool|string|null|int|float
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function renameColumn(string $table, string $oldName, string $newName): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function renameTable(string $table, string $newName): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function resetSequence(string $table, int|string $value = null): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function setRawSql(string $sql): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function setRetryHandler(?Closure $handler): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function setSql(string $sql): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function truncateTable(string $table): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function update(string $table, array $columns, array|string $condition = '', array $params = []): static
{
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
}

/**
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArgument
*/
public function upsert(
string $table,
Expand Down
Loading
Loading