coding & phpdoc improvements

This commit is contained in:
Steffen Schröder
2014-05-27 22:32:54 +02:00
parent 0a7bc3b234
commit 9e016cc770
5 changed files with 13 additions and 15 deletions

View File

@ -193,7 +193,9 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
break;
case self::RANKING_TYPE_RECORDS: //TODO verify workable status
if (!$this->maniaControl->pluginManager->isPluginActive(__NAMESPACE__ . '\LocalRecordsPlugin')) {
/** @var LocalRecordsPlugin $localRecordsPlugin */
$localRecordsPlugin = $this->maniaControl->pluginManager->getPlugin(__NAMESPACE__ . '\LocalRecordsPlugin');
if (!$localRecordsPlugin) {
return;
}
@ -212,9 +214,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
}
$result->free_result();
/** @var LocalRecordsPlugin $localRecordsPlugin */
$localRecordsPlugin = $this->maniaControl->pluginManager->getPlugin(__NAMESPACE__ . '\LocalRecordsPlugin');
$maps = $this->maniaControl->mapManager->getMaps();
$maps = $this->maniaControl->mapManager->getMaps();
foreach ($maps as $map) {
$records = $localRecordsPlugin->getLocalRecords($map, $maxRecords);