Skip to content

Commit 6e6f455

Browse files
authored
Fix RenderCallbackRule PHPStan errors (#710)
1 parent 718a503 commit 6e6f455

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/Rules/Drupal/RenderCallbackRule.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ public function processNode(Node $node, Scope $scope): array
102102
if (count($value->items) === 0) {
103103
return [];
104104
}
105-
if ($value->items[0] === null) {
106-
return [];
107-
}
108105
// @todo take $value->items[1] and validate parameters against the callback.
109106
return $this->doProcessNode($value->items[0]->value, $scope, $keyChecked, 0);
110107
}
@@ -120,9 +117,6 @@ public function processNode(Node $node, Scope $scope): array
120117
}
121118
$errors = [];
122119
foreach ($value->items as $pos => $item) {
123-
if (!$item instanceof Node\Expr\ArrayItem) {
124-
continue;
125-
}
126120
$errors[] = $this->doProcessNode($item->value, $scope, $keyChecked, $pos);
127121
}
128122
return array_merge(...$errors);

0 commit comments

Comments
 (0)