Merge pull request #14483 from bancer/patch-14

Fix invalid data type
This commit is contained in:
Mark Sch 2020-04-21 11:55:58 +02:00 committed by GitHub
commit 785734e052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,7 +81,7 @@ class CakeEventManager {
/** /**
* Adds a new listener to an event. Listeners * Adds a new listener to an event. Listeners
* *
* @param callback|CakeEventListener $callable PHP valid callback type or instance of CakeEventListener to be called * @param callable|CakeEventListener $callable PHP valid callback type or instance of CakeEventListener to be called
* when the event named with $eventKey is triggered. If a CakeEventListener instance is passed, then the `implementedEvents` * when the event named with $eventKey is triggered. If a CakeEventListener instance is passed, then the `implementedEvents`
* method will be called on the object to register the declared events individually as methods to be managed by this class. * method will be called on the object to register the declared events individually as methods to be managed by this class.
* It is possible to define multiple event handlers per event name. * It is possible to define multiple event handlers per event name.
@ -146,7 +146,7 @@ class CakeEventManager {
* *
* @param array $function the array taken from a handler definition for an event * @param array $function the array taken from a handler definition for an event
* @param CakeEventListener $object The handler object * @param CakeEventListener $object The handler object
* @return callback * @return callable
*/ */
protected function _extractCallable($function, $object) { protected function _extractCallable($function, $object) {
$method = $function['callable']; $method = $function['callable'];
@ -161,7 +161,7 @@ class CakeEventManager {
/** /**
* Removes a listener from the active listeners. * Removes a listener from the active listeners.
* *
* @param callback|CakeEventListener $callable any valid PHP callback type or an instance of CakeEventListener * @param callable|CakeEventListener $callable any valid PHP callback type or an instance of CakeEventListener
* @param string $eventKey The event unique identifier name with which the callback has been associated * @param string $eventKey The event unique identifier name with which the callback has been associated
* @return void * @return void
*/ */