Remove some PHPStan ignores and make others rule-specific.

This commit is contained in:
wn_
2024-11-12 03:38:45 +00:00
parent a784305cc7
commit dca2ae60a1
9 changed files with 8 additions and 16 deletions

View File

@@ -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]);