diff options
| author | wn_ <invalid@email.com> | 2024-11-12 03:38:45 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-11-12 03:38:45 +0000 |
| commit | dca2ae60a1c7a7951ee769aefeb19c4576c57aa6 (patch) | |
| tree | 613b5affdfa45bf9fa540d40cf88ddff9fb9bb54 /classes/PluginHost.php | |
| parent | a784305cc764a7e039ad87074f541db68a653a5a (diff) | |
Remove some PHPStan ignores and make others rule-specific.
Diffstat (limited to 'classes/PluginHost.php')
| -rw-r--r-- | classes/PluginHost.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/classes/PluginHost.php b/classes/PluginHost.php index 88eb5d2a4..b54e48d4f 100644 --- a/classes/PluginHost.php +++ b/classes/PluginHost.php @@ -386,8 +386,7 @@ class PluginHost { * @param PluginHost::HOOK_* $type */ function del_hook(string $type, Plugin $sender): void { - /** @phpstan-ignore function.alreadyNarrowedType ($type might not exist) */ - if (is_array($this->hooks[$type])) { + if (array_key_exists($type, $this->hooks)) { foreach (array_keys($this->hooks[$type]) as $prio) { $key = array_search($sender, $this->hooks[$type][$prio]); |