PHPDoc improvements

Replaced deprecated method call
This commit is contained in:
Steffen Schröder 2014-05-20 14:59:17 +02:00
parent 7bcd42d927
commit 6ca5decdb4
13 changed files with 27 additions and 22 deletions

View File

@ -2,7 +2,6 @@
namespace ManiaControl\Admin;
use FML\Controls\Control;
use FML\Controls\Frame;
use FML\Controls\Labels\Label_Button;
use FML\Controls\Labels\Label_Text;

View File

@ -149,7 +149,7 @@ class AuthCommands implements CommandListener {
}
/**
* Send usage example for //addop command
* Send usage example for //addmod command
*
* @param Player $player
* @return bool

View File

@ -351,9 +351,8 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
return;
}
$oldSetting = $this->maniaControl->settingManager->getSettingByIndex($settingIndex);
if (!isset($oldSetting)) {
$oldSetting = $this->maniaControl->settingManager->getSettingObjectByIndex($settingIndex);
if (!$oldSetting) {
var_dump('no setting ' . $settingIndex);
return;
}

View File

@ -123,7 +123,11 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
return true;
}
try {
$this->maniaControl->client->setServerOptions($serverSettings);
} catch (ServerOptionsException $exception) {
$this->maniaControl->chat->sendExceptionToAdmins($exception);
}
return true;
}

View File

@ -103,7 +103,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
/**
* Shows which map is the next
*
* @param array $chat
* @param array $chatCallback
* @param Player $player
*/
public function command_ShowNextMap(array $chatCallback, Player $player) {
@ -126,7 +126,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
/**
* Handle removemap command
*
* @param array $chat
* @param array $chatCallback
* @param Player $player
*/
public function command_RemoveMap(array $chatCallback, Player $player) {

View File

@ -64,7 +64,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca
//CallbackManager
$this->maniaControl->callbackManager->registerCallbackListener(Server::CB_TEAM_MODE_CHANGED, $this, 'teamStatusChanged');
// Action Open Playerlist
// Action Open PlayerList
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_PLAYERLIST, $this, 'command_playerList');
$itemQuad = new Quad_UIConstruction_Buttons();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author);

View File

@ -416,9 +416,8 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
return;
}
$oldSetting = $this->maniaControl->settingManager->getSettingByIndex($settingIndex);
if (!isset($oldSetting)) {
$oldSetting = $this->maniaControl->settingManager->getSettingObjectByIndex($settingIndex);
if (!$oldSetting) {
var_dump('no setting with index: ' . $settingIndex);
return;
}

View File

@ -78,20 +78,21 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
$this->registerStat(StatisticCollector::STAT_ON_CAPTURE, 60, "C");
$this->registerStat(StatisticManager::SPECIAL_STAT_KD_RATIO, 70, "K/D", 12, StatisticManager::STAT_TYPE_FLOAT);
$this->registerStat(StatisticManager::SPECIAL_STAT_LASER_ACC, 80, "Lacc", 15, StatisticManager::STAT_TYPE_FLOAT);
$this->registerStat(StatisticManager::SPECIAL_STAT_LASER_ACC, 80, "LAcc", 15, StatisticManager::STAT_TYPE_FLOAT);
$this->registerStat(StatisticManager::SPECIAL_STAT_HITS_PH, 85, "H/h", 15, StatisticManager::STAT_TYPE_FLOAT);
}
/**
* Register a Certain Stat
*
* @param $statName
* @param $order
* @param $headShortCut
* @param string $statName
* @param int $order
* @param string $headShortCut
* @param int $width
* @param string $format
*/
public function registerStat($statName, $order, $headShortCut, $width = 10, $format = StatisticManager::STAT_TYPE_INT) {
// TODO: use own model class
$this->statArray[$order] = array();
$this->statArray[$order]["Name"] = $statName;
$this->statArray[$order]["HeadShortCut"] = '$o' . $headShortCut;

View File

@ -101,6 +101,8 @@ class ChatlogPlugin implements CallbackListener, Plugin {
/**
* Build the Log File Name and Folder
*
* @return bool
*/
private function buildLogFileName() {
$folderName = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_FOLDERNAME);
@ -132,6 +134,7 @@ class ChatlogPlugin implements CallbackListener, Plugin {
}
}
$this->fileName = $folderDir . DIRECTORY_SEPARATOR . $fileName;
return true;
}
/**

View File

@ -108,7 +108,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
// Register for commands
$this->maniaControl->commandManager->registerCommandListener('donate', $this, 'command_Donate', false, 'Donate some planets to the server.');
$this->maniaControl->commandManager->registerCommandListener('pay', $this, 'command_Pay', true, 'Pays planets from the server to a player.');
$this->maniaControl->commandManager->registerCommandListener('planets', $this, 'command_GetPlanets', true, 'Checks the planets-balance of the server.');
$this->maniaControl->commandManager->registerCommandListener(array('getplanets', 'planets'), $this, 'command_GetPlanets', true, 'Checks the planets-balance of the server.');
$this->maniaControl->commandManager->registerCommandListener('topdons', $this, 'command_TopDons', false, 'Provides an overview of who donated the most planets.');
// Register for callbacks