diff --git a/application/core/Admin/AdminLists.php b/application/core/Admin/AdminLists.php index 4157a609..26c770a1 100644 --- a/application/core/Admin/AdminLists.php +++ b/application/core/Admin/AdminLists.php @@ -232,21 +232,19 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener { /** * Closes the widget * - * @param array $callback + * @param \ManiaControl\Players\Player $player */ - public function closeWidget(array $callback) { - $player = $callback[1]; + public function closeWidget(Player $player) { unset($this->adminListShown[$player->login]); } /** * Unset the player if he opened another Main Widget * - * @param array $callback + * @param Player $player + * @param $openedWidget */ - public function handleWidgetOpened(array $callback) { - $player = $callback[1]; - $openedWidget = $callback[2]; + public function handleWidgetOpened(Player $player, $openedWidget) { //unset when another main widget got opened if ($openedWidget != 'AdminList') { unset($this->adminListShown[$player->login]); diff --git a/application/core/Configurators/Configurator.php b/application/core/Configurators/Configurator.php index 54e996fe..361414bc 100644 --- a/application/core/Configurators/Configurator.php +++ b/application/core/Configurators/Configurator.php @@ -166,11 +166,10 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn /** * Unset the player if he opened another Main Widget * - * @param array $callback + * @param Player $player + * @param $openedWidget */ - public function handleWidgetOpened(array $callback) { - $player = $callback[1]; - $openedWidget = $callback[2]; + public function handleWidgetOpened(Player $player, $openedWidget) { //unset when another main widget got opened if ($openedWidget != 'Configurator') { unset($this->playersMenuShown[$player->login]); @@ -180,10 +179,9 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn /** * Widget get closed -> unset player * - * @param array $callback + * @param \ManiaControl\Players\Player $player */ - public function closeWidget(array $callback) { - $player = $callback[1]; + public function closeWidget(Player $player) { unset($this->playersMenuShown[$player->login]); } diff --git a/application/core/ManiaExchange/ManiaExchangeList.php b/application/core/ManiaExchange/ManiaExchangeList.php index b50980d6..ca417669 100644 --- a/application/core/ManiaExchange/ManiaExchangeList.php +++ b/application/core/ManiaExchange/ManiaExchangeList.php @@ -307,14 +307,14 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener } } + /** * Unset the player if he opened another Main Widget * - * @param array $callback + * @param Player $player + * @param $openedWidget */ - public function handleWidgetOpened(array $callback) { - $player = $callback[1]; - $openedWidget = $callback[2]; + public function handleWidgetOpened(Player $player, $openedWidget) { //unset when another main widget got opened if ($openedWidget != 'ManiaExchangeList') { unset($this->mapListShown[$player->login]); @@ -324,10 +324,10 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener /** * Closes the widget * - * @param array $callback + * @param \ManiaControl\Players\Player $player + * @internal param array $callback */ - public function closeWidget(array $callback) { - $player = $callback[1]; + public function closeWidget(Player $player) { unset($this->mapListShown[$player->login]); } diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index 7a181c86..bae8f1f4 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -451,11 +451,10 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { /** * Unset the player if he opened another Main Widget * - * @param array $callback + * @param Player $player + * @param $openedWidget */ - public function handleWidgetOpened(array $callback) { - $player = $callback[1]; - $openedWidget = $callback[2]; + public function handleWidgetOpened(Player $player, $openedWidget) { //unset when another main widget got opened if ($openedWidget != 'MapList') { unset($this->mapListShown[$player->login]); @@ -465,10 +464,9 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { /** * Closes the widget * - * @param array $callback + * @param \ManiaControl\Players\Player $player */ - public function closeWidget(array $callback) { - $player = $callback[1]; + public function closeWidget(Player $player) { unset($this->mapListShown[$player->login]); } diff --git a/application/core/Players/PlayerList.php b/application/core/Players/PlayerList.php index 64ac2bff..a2916175 100644 --- a/application/core/Players/PlayerList.php +++ b/application/core/Players/PlayerList.php @@ -598,11 +598,10 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer /** * Unset the player if he opened another Main Widget * - * @param array $callback + * @param Player $player + * @param $openedWidget */ - public function handleWidgetOpened(array $callback) { - $player = $callback[1]; - $openedWidget = $callback[2]; + public function handleWidgetOpened(Player $player, $openedWidget) { //unset when another main widget got opened if ($openedWidget != 'PlayerList') { unset($this->playersListShown[$player->login]); @@ -612,10 +611,9 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer /** * Closes the widget * - * @param array $callback + * @param Player $player */ - public function closeWidget(array $callback) { - $player = $callback[1]; + public function closeWidget(Player $player) { unset($this->playersListShown[$player->login]); }