Skip to content

Commit c01318b

Browse files
committed
misc
1 parent b9aecce commit c01318b

4 files changed

Lines changed: 14 additions & 26 deletions

File tree

config/set/php84.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@
1414
use Rector\Php84\Rector\Param\ExplicitNullableParamTypeRector;
1515

1616
return static function (RectorConfig $rectorConfig): void {
17-
$rectorConfig->rules(
18-
[
19-
ExplicitNullableParamTypeRector::class,
20-
RoundingModeEnumRector::class,
21-
AddEscapeArgumentRector::class,
22-
NewMethodCallWithoutParenthesesRector::class,
23-
DeprecatedAnnotationToDeprecatedAttributeRector::class,
24-
ForeachToArrayFindRector::class,
25-
ForeachToArrayFindKeyRector::class,
26-
ForeachToArrayAllRector::class,
27-
ForeachToArrayAnyRector::class,
28-
]
29-
);
17+
$rectorConfig->rules([
18+
ExplicitNullableParamTypeRector::class,
19+
RoundingModeEnumRector::class,
20+
AddEscapeArgumentRector::class,
21+
NewMethodCallWithoutParenthesesRector::class,
22+
DeprecatedAnnotationToDeprecatedAttributeRector::class,
23+
ForeachToArrayFindRector::class,
24+
ForeachToArrayFindKeyRector::class,
25+
ForeachToArrayAllRector::class,
26+
ForeachToArrayAnyRector::class,
27+
]);
3028
};

rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,7 @@ private function cleanCastedExpr(Expr $expr): Expr
137137

138138
private function hasCallLikeInAssignExpr(Expr $expr): bool
139139
{
140-
return (bool) $this->betterNodeFinder->findFirst(
141-
$expr,
142-
$this->sideEffectNodeDetector->detectCallExpr(...)
143-
);
140+
return (bool) $this->betterNodeFinder->findFirst($expr, $this->sideEffectNodeDetector->detectCallExpr(...));
144141
}
145142

146143
/**

rules/DeadCode/SideEffect/SideEffectNodeDetector.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ public function detect(Expr $expr): bool
4848
return true;
4949
}
5050

51-
return (bool) $this->betterNodeFinder->findFirst(
52-
$expr,
53-
$this->detectCallExpr(...)
54-
);
51+
return (bool) $this->betterNodeFinder->findFirst($expr, $this->detectCallExpr(...));
5552
}
5653

5754
public function detectCallExpr(Node $node): bool

src/Util/ArrayParametersMerger.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ final class ArrayParametersMerger
1515
public function merge(mixed $left, mixed $right): mixed
1616
{
1717
if (is_array($left) && is_array($right)) {
18-
return $this->mergeLeftToRightWithCallable(
19-
$left,
20-
$right,
21-
$this->merge(...)
22-
);
18+
return $this->mergeLeftToRightWithCallable($left, $right, $this->merge(...));
2319
}
2420

2521
if ($left !== null) {

0 commit comments

Comments
 (0)