From a784305cc764a7e039ad87074f541db68a653a5a Mon Sep 17 00:00:00 2001 From: wn_ Date: Tue, 12 Nov 2024 03:15:53 +0000 Subject: Address PHPStan findings as of 2.0.1 --- classes/PluginHost.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes/PluginHost.php') diff --git a/classes/PluginHost.php b/classes/PluginHost.php index 23ff03661..88eb5d2a4 100644 --- a/classes/PluginHost.php +++ b/classes/PluginHost.php @@ -386,6 +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])) { foreach (array_keys($this->hooks[$type]) as $prio) { $key = array_search($sender, $this->hooks[$type][$prio]); @@ -589,7 +590,7 @@ class PluginHost { } } - /** @return array> command type -> details array */ + /** @return array command type -> details array */ function get_commands() { return $this->commands; } -- cgit v1.2.3-54-g00ecf