From 23c58b47ff04bd420fb7e85a96948f04145cdd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 13 May 2014 18:26:38 +0200 Subject: [PATCH] minor spelling & phpdoc improvements --- application/core/Admin/AdminLists.php | 2 +- application/core/Callbacks/Callbacks.php | 75 +++++++++++-------- application/core/Players/PlayerList.php | 2 +- application/core/Server/ServerCommands.php | 2 +- .../core/Statistics/StatisticCollector.php | 4 +- .../MCTeam/Dedimania/DedimaniaPlugin.php | 4 +- application/plugins/MCTeam/DonationPlugin.php | 2 +- application/plugins/MCTeam/KarmaPlugin.php | 10 +-- .../plugins/MCTeam/ServerRankingPlugin.php | 6 +- .../plugins/steeffeen/ObstaclePlugin.php | 2 +- 10 files changed, 60 insertions(+), 49 deletions(-) diff --git a/application/core/Admin/AdminLists.php b/application/core/Admin/AdminLists.php index 06721456..dabf39cd 100644 --- a/application/core/Admin/AdminLists.php +++ b/application/core/Admin/AdminLists.php @@ -56,7 +56,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener { $itemQuad = new Quad_UIConstruction_Buttons(); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author); $itemQuad->setAction(self::ACTION_OPEN_ADMINLISTS); - $this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open Adminlist'); + $this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open AdminList'); } /** diff --git a/application/core/Callbacks/Callbacks.php b/application/core/Callbacks/Callbacks.php index e3b4d1cc..ac490f98 100644 --- a/application/core/Callbacks/Callbacks.php +++ b/application/core/Callbacks/Callbacks.php @@ -1,7 +1,9 @@ playersListShown[$caller->login] = $login; - // Reopen playerlist + // Reopen PlayerList $this->showPlayerList($caller); } diff --git a/application/core/Server/ServerCommands.php b/application/core/Server/ServerCommands.php index 94346752..bd403b46 100644 --- a/application/core/Server/ServerCommands.php +++ b/application/core/Server/ServerCommands.php @@ -58,7 +58,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage $this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_ONINIT, $this, 'handleOnInit'); // Register for commands - $this->maniaControl->commandManager->registerCommandListener('setservername', $this, 'command_SetServerName', true, 'Sets the servername.'); + $this->maniaControl->commandManager->registerCommandListener('setservername', $this, 'command_SetServerName', true, 'Sets the ServerName.'); $this->maniaControl->commandManager->registerCommandListener('setpwd', $this, 'command_SetPwd', true, 'Sets play password.'); $this->maniaControl->commandManager->registerCommandListener('setspecpwd', $this, 'command_SetSpecPwd', true, 'Sets spectator password.'); $this->maniaControl->commandManager->registerCommandListener('setmaxplayers', $this, 'command_SetMaxPlayers', true, 'Sets the maximum number of players.'); diff --git a/application/core/Statistics/StatisticCollector.php b/application/core/Statistics/StatisticCollector.php index 1f51facd..333d6868 100644 --- a/application/core/Statistics/StatisticCollector.php +++ b/application/core/Statistics/StatisticCollector.php @@ -20,8 +20,8 @@ class StatisticCollector implements CallbackListener { * Constants */ const SETTING_COLLECT_STATS_ENABLED = 'Collect Stats Enabled'; - const SETTING_COLLECT_STATS_MINPLAYERS = 'Minimum Playercount for Collecting Stats'; - const SETTING_ON_SHOOT_PRESTORE = 'Prestore Shoots before insert into Database'; + const SETTING_COLLECT_STATS_MINPLAYERS = 'Minimum Player Count for Collecting Stats'; + const SETTING_ON_SHOOT_PRESTORE = 'Prestore Shots before Insert into Database'; /* * Statistics */ diff --git a/application/plugins/MCTeam/Dedimania/DedimaniaPlugin.php b/application/plugins/MCTeam/Dedimania/DedimaniaPlugin.php index 2730cd2a..682cf808 100644 --- a/application/plugins/MCTeam/Dedimania/DedimaniaPlugin.php +++ b/application/plugins/MCTeam/Dedimania/DedimaniaPlugin.php @@ -335,7 +335,9 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene } /** - * Build map info struct for dedimania requests + * Build Map Info Array for Dedimania Requests + * + * @return array */ private function getMapInfo() { $map = $this->maniaControl->mapManager->getCurrentMap(); diff --git a/application/plugins/MCTeam/DonationPlugin.php b/application/plugins/MCTeam/DonationPlugin.php index d140cd05..a1894b01 100644 --- a/application/plugins/MCTeam/DonationPlugin.php +++ b/application/plugins/MCTeam/DonationPlugin.php @@ -449,7 +449,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { } /** - * Provide an overview ManiaLink with donators + * Provide an Overview ManiaLink with Donators * * @param Player $player */ diff --git a/application/plugins/MCTeam/KarmaPlugin.php b/application/plugins/MCTeam/KarmaPlugin.php index 3c1f150a..09da9e50 100644 --- a/application/plugins/MCTeam/KarmaPlugin.php +++ b/application/plugins/MCTeam/KarmaPlugin.php @@ -364,11 +364,9 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { if (!$player) { $properties['getvotesonly'] = false; $properties['playerlogins'] = array(); - foreach ($this->maniaControl->playerManager->getPlayers() as $plyr) { - /** - * @var Player $player - */ - $properties['playerlogins'][] = $plyr->login; + foreach ($this->maniaControl->playerManager->getPlayers() as $loopPlayer) { + /** @var Player $loopPlayer */ + $properties['playerlogins'][] = $loopPlayer->login; } } else { $properties['getvotesonly'] = true; @@ -1003,7 +1001,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { } /** - * Save Mx Karma Votes at Mapend + * Save Mx Karma Votes at MapEnd */ public function sendMxKarmaVotes(Map $map) { if (!$this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MX_KARMA_ACTIVATED)) { diff --git a/application/plugins/MCTeam/ServerRankingPlugin.php b/application/plugins/MCTeam/ServerRankingPlugin.php index 91b78f3e..7192550e 100644 --- a/application/plugins/MCTeam/ServerRankingPlugin.php +++ b/application/plugins/MCTeam/ServerRankingPlugin.php @@ -130,8 +130,8 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener { $this->maniaControl->callbackManager->registerCallbackListener(Callbacks::ENDMAP, $this, 'handleEndMap'); //Register CommandListener - $this->maniaControl->commandManager->registerCommandListener('rank', $this, 'command_showRank', false, 'Shows your current serverrank.'); - $this->maniaControl->commandManager->registerCommandListener('nextrank', $this, 'command_nextRank', false, 'Shows the person in front of you in the serverranking.'); + $this->maniaControl->commandManager->registerCommandListener('rank', $this, 'command_showRank', false, 'Shows your current ServerRank.'); + $this->maniaControl->commandManager->registerCommandListener('nextrank', $this, 'command_nextRank', false, 'Shows the person in front of you in the ServerRanking.'); $this->maniaControl->commandManager->registerCommandListener(array('topranks', 'top100'), $this, 'command_topRanks', false, 'Shows an overview of the best-ranked 100 players.'); $this->resetRanks(); //TODO only update records count @@ -148,7 +148,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener { `Avg` float NOT NULL default 0, KEY `PlayerIndex` (`PlayerIndex`), UNIQUE `Rank` (`Rank`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Mania Control Serverranking';"; + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Mania Control ServerRanking';"; $mysqli->query($query); if ($mysqli->error) { trigger_error($mysqli->error, E_USER_ERROR); diff --git a/application/plugins/steeffeen/ObstaclePlugin.php b/application/plugins/steeffeen/ObstaclePlugin.php index ef6dae3a..56290a9d 100644 --- a/application/plugins/steeffeen/ObstaclePlugin.php +++ b/application/plugins/steeffeen/ObstaclePlugin.php @@ -74,7 +74,7 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin { * @see \ManiaControl\Plugins\Plugin::getDescription() */ public static function getDescription() { - return "Plugin offering CP Jumping and Local Records Support for the ShootManie Gamemode 'Obstacle'."; + return "Plugin offering CP Jumping and Local Records Support for the ShootMania GameMode 'Obstacle'."; } /**