Skip to content

Commit

Permalink
Merge pull request #9232 from samsonasik/refactor-enable-rector-code-…
Browse files Browse the repository at this point in the history
…quality-level-14

refactor: enable rector code quality level 14
  • Loading branch information
samsonasik authored Oct 21, 2024
2 parents 28d7607 + ff2f756 commit ba62eae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
use Rector\CodeQuality\Rector\Ternary\TernaryEmptyArrayArrayDimFetchToCoalesceRector;
use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector;
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
Expand Down Expand Up @@ -189,14 +187,12 @@
ChangeNestedForeachIfsToEarlyContinueRector::class,
ChangeIfElseValueAssignToEarlyReturnRector::class,
CombineIfRector::class,
SimplifyIfReturnBoolRector::class,
InlineIfToExplicitIfRector::class,
PreparedValueToEarlyReturnRector::class,
ShortenElseIfRector::class,
SimplifyIfElseToTernaryRector::class,
UnusedForeachValueToArrayKeysRector::class,
ChangeArrayPushToArrayAssignRector::class,
UnnecessaryTernaryExpressionRector::class,
RemoveErrorSuppressInTryCatchStmtsRector::class,
FuncGetArgsToVariadicParamRector::class,
MakeInheritedMethodVisibilitySameAsParentRector::class,
Expand All @@ -220,4 +216,4 @@
// keep '\\' prefix string on string '\Foo\Bar'
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
])
->withCodeQualityLevel(9);
->withCodeQualityLevel(14);
2 changes: 1 addition & 1 deletion system/Config/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public static function email($config = null, bool $getShared = true)
return static::getSharedInstance('email', $config);
}

if (empty($config) || ! (is_array($config) || $config instanceof EmailConfig)) {
if (empty($config) || (! is_array($config) && ! $config instanceof EmailConfig)) {
$config = config(EmailConfig::class);
}

Expand Down
2 changes: 1 addition & 1 deletion system/Images/Handlers/ImageMagickHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct($config = null)
{
parent::__construct($config);

if (! (extension_loaded('imagick') || class_exists(Imagick::class))) {
if (! extension_loaded('imagick') && ! class_exists(Imagick::class)) {
throw ImageException::forMissingExtension('IMAGICK'); // @codeCoverageIgnore
}

Expand Down

0 comments on commit ba62eae

Please sign in to comment.