Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#2135 from Thinkscape/h…
Browse files Browse the repository at this point in the history
…otfix/callable-not-callback

Change all 'callback' typehints to 'callable'
  • Loading branch information
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions src/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function addIdentifiers($identifiers)
* @param string $event
* @param string|object $target Object calling emit, or symbol describing target (such as static method name)
* @param array|ArrayAccess $argv Array of arguments; typically, should be associative
* @param null|callback $callback
* @param null|callable $callback
* @return ResponseCollection All listener return values
* @throws Exception\InvalidCallbackException
*/
Expand Down Expand Up @@ -219,9 +219,9 @@ public function trigger($event, $target = null, $argv = array(), $callback = nul
* @param string $event
* @param string|object $target Object calling emit, or symbol describing target (such as static method name)
* @param array|ArrayAccess $argv Array of arguments; typically, should be associative
* @param Callable $callback
* @param callable $callback
* @return ResponseCollection
* @throws Exception\InvalidCallbackException if invalid callback provided
* @throws Exception\InvalidCallbackException if invalid callable provided
*/
public function triggerUntil($event, $target, $argv = null, $callback = null)
{
Expand Down Expand Up @@ -266,9 +266,9 @@ public function triggerUntil($event, $target, $argv = null, $callback = null)
* be triggered for every event.
*
* @param string|array|ListenerAggregateInterface $event An event or array of event names. If a ListenerAggregateInterface, proxies to {@link attachAggregate()}.
* @param callback|int $callback If string $event provided, expects PHP callback; for a ListenerAggregateInterface $event, this will be the priority
* @param int $priority If provided, the priority at which to register the callback
* @return CallbackHandler|mixed CallbackHandler if attaching callback (to allow later unsubscribe); mixed if attaching aggregate
* @param callable|int $callback If string $event provided, expects PHP callback; for a ListenerAggregateInterface $event, this will be the priority
* @param int $priority If provided, the priority at which to register the callable
* @return CallbackHandler|mixed CallbackHandler if attaching callable (to allow later unsubscribe); mixed if attaching aggregate
* @throws Exception\InvalidArgumentException
*/
public function attach($event, $callback = null, $priority = 1)
Expand Down Expand Up @@ -433,7 +433,7 @@ public function prepareArgs(array $args)
*
* @param string $event Event name
* @param EventInterface $e
* @param null|callback $callback
* @param null|callable $callback
* @return ResponseCollection
*/
protected function triggerListeners($event, EventInterface $e, $callback = null)
Expand Down
6 changes: 3 additions & 3 deletions src/EventManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface EventManagerInterface extends SharedEventManagerAwareInterface
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param null|callback $callback
* @param null|callable $callback
* @return ResponseCollection
*/
public function trigger($event, $target = null, $argv = array(), $callback = null);
Expand All @@ -53,7 +53,7 @@ public function trigger($event, $target = null, $argv = array(), $callback = nul
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param callback $callback
* @param callable $callback
* @return ResponseCollection
*/
public function triggerUntil($event, $target, $argv = null, $callback = null);
Expand All @@ -62,7 +62,7 @@ public function triggerUntil($event, $target, $argv = null, $callback = null);
* Attach a listener to an event
*
* @param string $event
* @param callback $callback
* @param callable $callback
* @param int $priority Priority at which to register listener
* @return CallbackHandler
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function run($context, array $params = array());
/**
* Attach an intercepting filter
*
* @param callback $callback
* @param callable $callback
* @return CallbackHandler
*/
public function attach($callback);
Expand Down
2 changes: 1 addition & 1 deletion src/FilterChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function run($context, array $argv = array())
/**
* Connect a filter to the chain
*
* @param callback $callback PHP Callback
* @param callable $callback PHP Callback
* @param int $priority Priority in the queue at which to execute; defaults to 1 (higher numbers == higher priority)
* @return CallbackHandler (to allow later unsubscribe)
* @throws Exception\InvalidCallbackException
Expand Down
4 changes: 2 additions & 2 deletions src/GlobalEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function trigger($event, $context, $argv = array())
* @param string $event
* @param string|object $context
* @param array|object $argv
* @param callback $callback
* @param callable $callback
* @return ResponseCollection
*/
public static function triggerUntil($event, $context, $argv, $callback)
Expand All @@ -86,7 +86,7 @@ public static function triggerUntil($event, $context, $argv, $callback)
* Attach a listener to an event
*
* @param string $event
* @param callback $callback
* @param callable $callback
* @param int $priority
* @return CallbackHandler
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SharedEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SharedEventManager implements SharedEventManagerInterface
*
* @param string|array $id Identifier(s) for event emitting component(s)
* @param string $event
* @param callback $callback PHP Callback
* @param callable $callback PHP Callback
* @param int $priority Priority at which listener should execute
* @return CallbackHander|array Either CallbackHandler or array of CallbackHandlers
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SharedEventManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getListeners($id, $event);
*
* @param string|array $id Identifier(s) for event emitting component(s)
* @param string $event
* @param callback $callback PHP Callback
* @param callable $callback PHP Callback
* @param int $priority Priority at which listener should execute
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion test/TestAsset/StaticEventsMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function getListeners($id, $event)
*
* @param string|array $id Identifier(s) for event emitting component(s)
* @param string $event
* @param callback $callback PHP Callback
* @param callable $callback PHP Callback
* @param int $priority Priority at which listener should execute
* @return void
*/
Expand Down

0 comments on commit 11d36d3

Please sign in to comment.