improved type hint
This commit is contained in:
parent
cdc8054371
commit
1fa1d7ee7d
@ -83,11 +83,11 @@ class CommandManager implements CallbackListener {
|
|||||||
/**
|
/**
|
||||||
* Add a Listener Callback to the given Listener Array
|
* Add a Listener Callback to the given Listener Array
|
||||||
*
|
*
|
||||||
* @param array $listenerArray
|
* @param array $listenerArray
|
||||||
* @param array $listenerCallback
|
* @param callable $listenerCallback
|
||||||
* @param string $command
|
* @param string $command
|
||||||
*/
|
*/
|
||||||
private function addListenerCallback(array &$listenerArray, array $listenerCallback, $command) {
|
private function addListenerCallback(array &$listenerArray, callable $listenerCallback, $command) {
|
||||||
if (!array_key_exists($command, $listenerArray) || !is_array($listenerArray[$command])) {
|
if (!array_key_exists($command, $listenerArray) || !is_array($listenerArray[$command])) {
|
||||||
// Init listeners array
|
// Init listeners array
|
||||||
$listenerArray[$command] = array();
|
$listenerArray[$command] = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user