added, fixed & improved PHPDoc & Type Hints

This commit is contained in:
Steffen Schröder
2014-05-02 16:13:45 +02:00
parent 7469d97712
commit 212517d290
32 changed files with 157 additions and 89 deletions

View File

@ -70,7 +70,6 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
//do nothing
}
/**
* @see \ManiaControl\Plugins\Plugin::load()
*/
@ -153,9 +152,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
}
/**
* Handle ManiaControl OnStartup
*
* @param array $callback
* Display the Widget
*/
public function displayWidget() {
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_DONATE_WIDGET_ACTIVATED)) {
@ -323,12 +320,15 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
}
/**
* Handles a Player Donate
* Handle a Player Donation
*
* @param Player $player
* @param $value
* @param int $amount
* @param string $receiver
* @param string $receiverName
* @return bool
*/
private function handleDonation(Player $player, $amount, $receiver = '', $receiverName = false) {
private function handleDonation(Player $player, $amount, $receiver = '', $receiverName = null) {
if (!$receiverName) {
$serverName = $this->maniaControl->client->getServerName();

View File

@ -149,9 +149,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
}
/**
* Displays the Widgets onLoad
*
* @param array $callback
* Display the Widgets
*/
private function displayWidgets() {
// Display Map Widget
@ -168,11 +166,11 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
}
/**
* Displays the Map Widget
* Display the Map Widget
*
* @param String $login
* @param string $login
*/
public function displayMapWidget($login = false) {
public function displayMapWidget($login = null) {
$pos_x = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_POSX);
$pos_y = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_POSY);
$width = $this->maniaControl->settingManager->getSetting($this, self::SETTING_MAP_WIDGET_WIDTH);
@ -280,11 +278,11 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin {
}
/**
* Displays the Server Info Widget
* Display the Server Info Widget
*
* @param String $login
* @param string $login
*/
public function displayServerInfoWidget($login = false) {
public function displayServerInfoWidget($login = null) {
$pos_x = $this->maniaControl->settingManager->getSetting($this, self::SETTING_SERVERINFO_WIDGET_POSX);
$pos_y = $this->maniaControl->settingManager->getSetting($this, self::SETTING_SERVERINFO_WIDGET_POSY);
$width = $this->maniaControl->settingManager->getSetting($this, self::SETTING_SERVERINFO_WIDGET_WIDTH);