More yoda conditions

This commit is contained in:
David Stone
2025-02-09 12:30:02 -07:00
parent d9122a410d
commit 0a4c81c105
97 changed files with 323 additions and 289 deletions

View File

@ -33,22 +33,23 @@ class Async_Calls {
*
* @var array
*/
static $registry = [];
public static $registry = [];
/**
* Registers a new listener.
*
* @since 2.0.7
*
* @param string $id The id of the listener.
* @param callable $callable A callback to be run.
* @param callable $callback A callback to be run.
* @param mixed ...$args Arguments to be passed to the callback.
*
* @return void
*@since 2.0.7
*
*/
public static function register_listener($id, $callable, ...$args): void {
public static function register_listener($id, $callback, ...$args): void {
self::$registry[ $id ] = [
'callable' => $callable,
'callable' => $callback,
'args' => $args,
];
}