Skip to content

Commit b36655f

Browse files
committed
Fix
1 parent ff961bc commit b36655f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rules/CodeQuality/Rector/Class_/ControllerMethodInjectionToConstructorRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ public function refactor(Node $node): ?Node
171171
}
172172

173173
if (
174-
in_array($this->getName($param->var), $constructParamVariables, true)
174+
$constructParamVariables !== []
175+
&& in_array($this->getName($param->var), $constructParamVariables, true)
175176
&&
176177
! in_array($this->getName($param->type), array_keys($constructParamVariables), true)
177178
) {

0 commit comments

Comments
 (0)