From c6e54369fb4836aa304e830305cfa2716884a1c0 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo <1102197+priyadi@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:12:41 +0700 Subject: [PATCH] chore: rector run (#186) --- .../src/QueryBuilderAdapter.php | 2 +- .../src/QueryBuilderAdapter.php | 2 +- rector.php | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/rekapager-doctrine-dbal-adapter/src/QueryBuilderAdapter.php b/packages/rekapager-doctrine-dbal-adapter/src/QueryBuilderAdapter.php index 5ad6d3d..a047d09 100644 --- a/packages/rekapager-doctrine-dbal-adapter/src/QueryBuilderAdapter.php +++ b/packages/rekapager-doctrine-dbal-adapter/src/QueryBuilderAdapter.php @@ -128,7 +128,7 @@ private function getQueryBuilder( foreach ($parameters as $template => $parameter) { /** - * @psalm-suppress PossiblyInvalidArgument + * @psalm-suppress PossiblyInvalidArgument */ $queryBuilder->setParameter( $template, diff --git a/packages/rekapager-doctrine-orm-adapter/src/QueryBuilderAdapter.php b/packages/rekapager-doctrine-orm-adapter/src/QueryBuilderAdapter.php index 083470b..aa02283 100644 --- a/packages/rekapager-doctrine-orm-adapter/src/QueryBuilderAdapter.php +++ b/packages/rekapager-doctrine-orm-adapter/src/QueryBuilderAdapter.php @@ -166,7 +166,7 @@ private function getQueryBuilder( } /** - * @psalm-suppress PossiblyInvalidArgument + * @psalm-suppress PossiblyInvalidArgument */ $queryBuilder->setParameter( $template, diff --git a/rector.php b/rector.php index 8f8ea58..2446bfc 100644 --- a/rector.php +++ b/rector.php @@ -13,6 +13,7 @@ use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; use Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector; +use Rector\Php81\Rector\Array_\FirstClassCallableRector; use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector; use Rector\Strict\Rector\Ternary\DisallowedShortTernaryRuleFixerRector; @@ -95,4 +96,9 @@ ShortenElseIfRector::class => [ __DIR__ . '/packages/rekapager-adapter-common/src/KeysetExpressionCalculator.php', ], + + FirstClassCallableRector::class => [ + __DIR__ . '/packages/rekapager-doctrine-dbal-adapter/src/QueryBuilderAdapter.php', + __DIR__ . '/packages/rekapager-doctrine-orm-adapter/src/QueryBuilderAdapter.php', + ], ]);