From 18b53a178bc6651494682fc90c0358a10347ada3 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 27 Jun 2022 21:31:11 -0700 Subject: [PATCH] (NFC) HookStyleListener - Comments --- Civi/Core/CiviEventDispatcher.php | 2 +- Civi/Core/Event/HookStyleListener.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Civi/Core/CiviEventDispatcher.php b/Civi/Core/CiviEventDispatcher.php index 8d7240fe0f..d8db0119bc 100644 --- a/Civi/Core/CiviEventDispatcher.php +++ b/Civi/Core/CiviEventDispatcher.php @@ -98,7 +98,7 @@ class CiviEventDispatcher extends EventDispatcher { * Ex: 'hook_civicrm_publicEvent' * Ex: '&hook_civicrm_publicEvent' (an alias for 'hook_civicrm_publicEvent' in which the listener abides hook-style ordered parameters). * This notation is handy when attaching via listener-maps (e.g. `getSubscribedEvents()`). - * @param callable $listener + * @param callable|HookStyleListener $listener * @param int $priority */ public function addListener($eventName, $listener, $priority = 0) { diff --git a/Civi/Core/Event/HookStyleListener.php b/Civi/Core/Event/HookStyleListener.php index 28a3ee85a8..ed19e70e01 100644 --- a/Civi/Core/Event/HookStyleListener.php +++ b/Civi/Core/Event/HookStyleListener.php @@ -22,7 +22,7 @@ class HookStyleListener { private $callback = NULL; /** - * @param array $callback + * @param array|callable $callback * Ex: ['SomeClass', 'someMethod'] */ public function __construct($callback) { -- 2.25.1