diff --git a/src/core/Dispatcher.php b/src/core/Dispatcher.php index 1f26588..a3fe0eb 100644 --- a/src/core/Dispatcher.php +++ b/src/core/Dispatcher.php @@ -74,13 +74,6 @@ class Dispatcher ); } - /** - * Sets the engine instance - * - * @param Engine $engine Flight instance - * - * @return void - */ public function setEngine(Engine $engine): void { $this->engine = $engine; @@ -158,14 +151,7 @@ class Dispatcher return $output; } - /** - * Assigns a callback to an event. - * - * @param string $name Event name. - * @param callable(): (void|mixed) $callback Callback function. - * - * @return $this - */ + /** Assigns a callback to an event */ public function set(string $name, callable $callback): self { $this->events[$name] = $callback; @@ -173,13 +159,7 @@ class Dispatcher return $this; } - /** - * Gets an assigned callback. - * - * @param string $name Event name. - * - * @return null|(callable(): (void|mixed)) $callback Callback function. - */ + /** Gets an assigned callback */ public function get(string $name): ?callable { return $this->events[$name] ?? null; @@ -498,11 +478,7 @@ class Dispatcher } } - /** - * Resets the object to the initial state. - * - * @return $this - */ + /** Resets the object to the initial state */ public function reset(): self { $this->events = []; diff --git a/src/core/EventDispatcher.php b/src/core/EventDispatcher.php index 251217c..823354c 100644 --- a/src/core/EventDispatcher.php +++ b/src/core/EventDispatcher.php @@ -12,7 +12,7 @@ class EventDispatcher /** @var array> */ protected array $listeners = []; - /** Singleton instance of the EventDispatcher. */ + /** Singleton instance of the EventDispatcher */ public static function getInstance(): self { if (!self::$instance) {