From b8f15e07b7741ee7c5ce5594f93c4f597dcd6705 Mon Sep 17 00:00:00 2001 From: Grigory Chibizov Date: Mon, 22 Jan 2024 18:00:39 +0600 Subject: [PATCH] Add a psalm-suppress comment and change psalm config --- psalm.xml | 6 ++++++ src/Providers/ClassicListenerProvider.php | 1 + 2 files changed, 7 insertions(+) diff --git a/psalm.xml b/psalm.xml index 451866c..91583a4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -67,5 +67,11 @@ + + + + + + \ No newline at end of file diff --git a/src/Providers/ClassicListenerProvider.php b/src/Providers/ClassicListenerProvider.php index 28b7efc..41102b9 100644 --- a/src/Providers/ClassicListenerProvider.php +++ b/src/Providers/ClassicListenerProvider.php @@ -116,6 +116,7 @@ public function off(string $eventClass, callable $listener): void $listeners = array_map(fn(array $listener): callable => $listener[0], $this->listeners[$eventClass]); foreach ($listeners as $index => $activeListener) { + /** @psalm-suppress TypeDoesNotContainType $activeListener */ if ($activeListener == $listener) { unset($this->listeners[$eventClass][$index]); }