Skip to content

Commit e26e06e

Browse files
committed
Updated Rector to commit e6fb248f32da563c3046db1c6c81b52c4bfecda3
rectorphp/rector-src@e6fb248 [TypeDeclaration] Add test case isAbstract() check on FeatureFlags::treatClassesAsFinal() on AddMethodCallBasedStrictParamTypeRector (#7015)
1 parent 76305df commit e26e06e

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

rules/Php84/Rector/Foreach_/ForeachToArrayFindKeyRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare (strict_types=1);
44
namespace Rector\Php84\Rector\Foreach_;
55

6+
use PhpParser\Node\Expr;
67
use PhpParser\Node;
78
use PhpParser\Node\Expr\ArrowFunction;
89
use PhpParser\Node\Expr\Assign;
@@ -115,7 +116,7 @@ public function provideMinPhpVersion() : int
115116
}
116117
private function isValidForeachStructure(Foreach_ $foreach, Variable $assignedVariable) : bool
117118
{
118-
if ($foreach->keyVar === null || \count($foreach->stmts) !== 1) {
119+
if (!$foreach->keyVar instanceof Expr || \count($foreach->stmts) !== 1) {
119120
return \false;
120121
}
121122
$firstStmt = $foreach->stmts[0];

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '051e9336a50f80cee7f6ff87c1869df7a60f710d';
22+
public const PACKAGE_VERSION = 'e6fb248f32da563c3046db1c6c81b52c4bfecda3';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-06-22 06:38:37';
27+
public const RELEASE_DATE = '2025-06-22 14:51:03';
2828
/**
2929
* @var int
3030
*/

src/NodeAnalyzer/ParamAnalyzer.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,9 @@ private function isParamUsed(Node $node, Param $param) : bool
156156
}
157157
private function isFuncGetArgsCall(Node $node) : bool
158158
{
159-
if (!$node instanceof Node\Expr\FuncCall) {
160-
return \false;
161-
}
162-
if (!$this->nodeNameResolver->isName($node, 'func_get_args')) {
159+
if (!$node instanceof FuncCall) {
163160
return \false;
164161
}
165-
return \true;
162+
return $this->nodeNameResolver->isName($node, 'func_get_args');
166163
}
167164
}

0 commit comments

Comments
 (0)