Skip to content

Commit

Permalink
Fix RenderCallbackRule PHPStan errors (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
mglaman authored Jan 10, 2024
1 parent 718a503 commit 6e6f455
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Rules/Drupal/RenderCallbackRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ public function processNode(Node $node, Scope $scope): array
if (count($value->items) === 0) {
return [];
}
if ($value->items[0] === null) {
return [];
}
// @todo take $value->items[1] and validate parameters against the callback.
return $this->doProcessNode($value->items[0]->value, $scope, $keyChecked, 0);
}
Expand All @@ -120,9 +117,6 @@ public function processNode(Node $node, Scope $scope): array
}
$errors = [];
foreach ($value->items as $pos => $item) {
if (!$item instanceof Node\Expr\ArrayItem) {
continue;
}
$errors[] = $this->doProcessNode($item->value, $scope, $keyChecked, $pos);
}
return array_merge(...$errors);
Expand Down

0 comments on commit 6e6f455

Please sign in to comment.