Skip to content

Commit 5f4cc60

Browse files
committed
feat: extra array check is not needed
1 parent 59a8b9f commit 5f4cc60

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/Hook.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ public function addFilter(array|string $hookNames, callable $callback, int $prio
4242
$hookNames = [$hookNames];
4343
}
4444

45-
if(!is_array($hookNames)) {
46-
throw new InvalidArgumentException("'\$hookNames' should be a string or an array");
47-
}
48-
4945
foreach($hookNames as $hookName) {
5046
$this->filters[$hookName] = $this->filters[$hookName] ?? [];
5147
$this->filters[$hookName]["callbacks"][$priority] = $this->filters[$hookName]["callbacks"][$priority] ?? [];

0 commit comments

Comments
 (0)