(NFC) HookStyleListener - Comments
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 28 Jun 2022 04:31:11 +0000 (21:31 -0700)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 26 Jul 2022 19:15:04 +0000 (20:15 +0100)
Civi/Core/CiviEventDispatcher.php
Civi/Core/Event/HookStyleListener.php

index 8d7240fe0ffd251f7680e8a71c48b1de20c55db9..d8db0119bc6395ac64dcd2ab6b7ffe2d05c69921 100644 (file)
@@ -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) {
index 28a3ee85a8d60cf165b8809487f8915cdf4362c6..ed19e70e011af81dca1c2ffbae7043ff4cf771a9 100644 (file)
@@ -22,7 +22,7 @@ class HookStyleListener {
   private $callback = NULL;
 
   /**
-   * @param array $callback
+   * @param array|callable $callback
    *   Ex: ['SomeClass', 'someMethod']
    */
   public function __construct($callback) {