Skip to content

Commit

Permalink
Merge pull request #434 from MittagQI/master
Browse files Browse the repository at this point in the history
PHPStan fixes
  • Loading branch information
develart-projects authored Oct 8, 2024
2 parents 99ee085 + f42b369 commit 825a746
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions library/Zend/Cache/Frontend/Function.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct(array $options = [])
/**
* Main method : call the specified function or get the result from cache
*
* @param callback $callback A valid callback
* @param callable $callback A valid callback
* @param array $parameters Function parameters
* @param array $tags Cache tags
* @param int $specificLifetime If != false, set a specific lifetime for this cache record (null => infinite lifetime)
Expand Down Expand Up @@ -126,7 +126,7 @@ private function _makeId($callback, array $args)
/**
* Make a cache id from the function name and parameters
*
* @param callback $callback A valid callback
* @param callable $callback A valid callback
* @param array $args Function parameters
* @throws Zend_Cache_Exception
* @return string Cache id
Expand Down
6 changes: 3 additions & 3 deletions library/Zend/EventManager/EventCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface Zend_EventManager_EventCollection
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param null|callback $callback
* @param null|callable $callback
* @return Zend_EventManager_ResponseCollection
*/
public function trigger($event, $target = null, $argv = [], $callback = null);
Expand All @@ -61,7 +61,7 @@ public function trigger($event, $target = null, $argv = [], $callback = null);
* @param string $event
* @param object|string $target
* @param array|object $argv
* @param callback $callback
* @param callable $callback
* @return Zend_EventManager_ResponseCollection
*/
public function triggerUntil($event, $target, $argv = null, $callback = null);
Expand All @@ -70,7 +70,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 Zend_Stdlib_CallbackHandler
*/
Expand Down
8 changes: 4 additions & 4 deletions library/Zend/EventManager/EventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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 Zend_EventManager_ResponseCollection All listener return values
*/
public function trigger($event, $target = null, $argv = [], $callback = null)
Expand Down Expand Up @@ -218,7 +218,7 @@ public function trigger($event, $target = null, $argv = [], $callback = null)
* @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
* @throws Zend_Stdlib_Exception_InvalidCallbackException if invalid callback provided
*/
public function triggerUntil($event, $target, $argv = null, $callback = null)
Expand Down Expand Up @@ -265,7 +265,7 @@ public function triggerUntil($event, $target, $argv = null, $callback = null)
* be triggered for every event.
*
* @param string|array|Zend_EventManager_ListenerAggregate $event An event or array of event names. If a ListenerAggregate, proxies to {@link attachAggregate()}.
* @param callback|int $callback If string $event provided, expects PHP callback; for a ListenerAggregate $event, this will be the priority
* @param callable|int|null $callback If string $event provided, expects PHP callback; for a ListenerAggregate $event, this will be the priority
* @param int $priority If provided, the priority at which to register the callback
* @return Zend_Stdlib_CallbackHandler|mixed CallbackHandler if attaching callback (to allow later unsubscribe); mixed if attaching aggregate
*/
Expand Down Expand Up @@ -433,7 +433,7 @@ public function prepareArgs(array $args)
*
* @param string $event Event name
* @param EventDescription $e
* @param null|callback $callback
* @param null|callable $callback
* @return Zend_EventManager_ResponseCollection
*/
protected function triggerListeners($event, Zend_EventManager_EventDescription $e, $callback = null)
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/EventManager/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function run($context, array $params = []);
/**
* Attach an intercepting filter
*
* @param callback $callback
* @param callable $callback
* @return Zend_Stdlib_CallbackHandler
*/
public function attach($callback);
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/EventManager/FilterChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function run($context, array $argv = [])
/**
* 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)
* @throws Zend_Stdlib_Exception_InvalidCallbackException
* @return Zend_Stdlib_CallbackHandler (to allow later unsubscribe)
Expand Down
4 changes: 2 additions & 2 deletions library/Zend/EventManager/GlobalEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function trigger($event, $context, $argv = [])
* @param string $event
* @param string|object $context
* @param array|object $argv
* @param callback $callback
* @param callable $callback
* @return Zend_EventManager_ResponseCollection
*/
public static function triggerUntil($event, $context, $argv, $callback)
Expand All @@ -95,7 +95,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 Zend_Stdlib_CallbackHandler
*/
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/EventManager/SharedEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Zend_EventManager_SharedEventManager implements Zend_EventManager_SharedEv
*
* @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
1 change: 0 additions & 1 deletion library/Zend/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class Zend_Exception extends Exception
*
* @param string $msg
* @param int $code
* @param Exception $previous
* @return void
*/
public function __construct($msg = '', $code = 0, ?\Throwable $previous = null)
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Zend_Log

/**
*
* @var callback
* @var callable|null
*/
protected $_origErrorHandler = null;

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Tool/Framework/Client/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class Zend_Tool_Framework_Client_Response
{
/**
* @var callback|null
* @var callable|null
*/
protected $_callback = null;

Expand Down

0 comments on commit 825a746

Please sign in to comment.