From 31c690d17b7ebf84982ecb659619209b11bbd078 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Thu, 1 Feb 2024 20:28:33 -0400 Subject: [PATCH] Dispatcher::reset now is also chaineable --- flight/core/Dispatcher.php | 6 +++++- phpstan.neon | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/flight/core/Dispatcher.php b/flight/core/Dispatcher.php index b1e6d73..7be4035 100644 --- a/flight/core/Dispatcher.php +++ b/flight/core/Dispatcher.php @@ -239,10 +239,14 @@ class Dispatcher /** * Resets the object to the initial state. + * + * @return $this */ - public function reset(): void + public function reset(): self { $this->events = []; $this->filters = []; + + return $this; } } diff --git a/phpstan.neon b/phpstan.neon index 0b21e61..95afff0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -8,3 +8,4 @@ parameters: paths: - flight - index.php + treatPhpDocTypesAsCertain: false