Skip to content

Commit

Permalink
Feedback improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfox committed Oct 12, 2024
1 parent 99d1290 commit 034af62
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public function refactor(Node $node): ?Node
return null;
}

if (! $node->args[0] instanceof Arg || ! $node->args[0]->value instanceof Closure) {
$args = $node->getArgs();

if (! isset($args[0]) || ! $args[0]->value instanceof Closure) {
return null;
}

Expand Down Expand Up @@ -136,7 +138,7 @@ public function refactor(Node $node): ?Node
return null;
}

if ($this->updateClosureWithTypes($node->args[0]->value, $keyType, $valueType)) {
if ($this->updateClosureWithTypes($args[0]->value, $keyType, $valueType)) {
return $node;
}

Expand Down

0 comments on commit 034af62

Please sign in to comment.