From 4fc7bea87dd78f733a663fefb74fad447c7702f5 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 3 Oct 2025 07:31:00 +0700 Subject: [PATCH] refactor: apply code quality level 40 for Rector --- rector.php | 4 +--- system/Test/Mock/MockCache.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rector.php b/rector.php index 738f3cd23109..d8af415767df 100644 --- a/rector.php +++ b/rector.php @@ -15,7 +15,6 @@ use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector; use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector; -use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector; use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector; use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; use Rector\CodeQuality\Rector\Ternary\TernaryEmptyArrayArrayDimFetchToCoalesceRector; @@ -183,7 +182,6 @@ InlineIfToExplicitIfRector::class, PreparedValueToEarlyReturnRector::class, UnusedForeachValueToArrayKeysRector::class, - ChangeArrayPushToArrayAssignRector::class, RemoveErrorSuppressInTryCatchStmtsRector::class, FuncGetArgsToVariadicParamRector::class, MakeInheritedMethodVisibilitySameAsParentRector::class, @@ -204,4 +202,4 @@ // keep '\\' prefix string on string '\Foo\Bar' StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true, ]) - ->withCodeQualityLevel(34); + ->withCodeQualityLevel(40); diff --git a/system/Test/Mock/MockCache.php b/system/Test/Mock/MockCache.php index 67f8aee86ad1..6699ad266c63 100644 --- a/system/Test/Mock/MockCache.php +++ b/system/Test/Mock/MockCache.php @@ -62,7 +62,7 @@ public function get(string $key) { $key = static::validateKey($key, $this->prefix); - return array_key_exists($key, $this->cache) ? $this->cache[$key] : null; + return $this->cache[$key] ?? null; } /**