formatting

This commit is contained in:
Steffen Schröder 2014-10-24 19:59:20 +02:00
parent 50547437f7
commit 30459811c0
2 changed files with 5 additions and 7 deletions

View File

@ -30,9 +30,9 @@ class DedimaniaData {
/** @var RecordData[] $records */ /** @var RecordData[] $records */
public $records = array(); public $records = array();
/** @var DedimaniaPlayer[] $players */ /** @var DedimaniaPlayer[] $players */
public $players = array(); public $players = array();
public $directoryAccessChecked = false; public $directoryAccessChecked = false;
public $serverMaxRank = 30; public $serverMaxRank = 30;
/** /**
* Construct a new Dedimania Data Model * Construct a new Dedimania Data Model
@ -44,11 +44,11 @@ class DedimaniaData {
* @param Version $serverVersion * @param Version $serverVersion
*/ */
public function __construct($serverLogin, $dedimaniaCode, $path, $packmask, Version $serverVersion) { public function __construct($serverLogin, $dedimaniaCode, $path, $packmask, Version $serverVersion) {
$this->game = "TM2"; $this->game = 'TM2';
$this->login = $serverLogin; $this->login = $serverLogin;
$this->code = $dedimaniaCode; $this->code = $dedimaniaCode;
$this->version = ManiaControl::VERSION; $this->version = ManiaControl::VERSION;
$this->tool = "ManiaControl"; $this->tool = 'ManiaControl';
$this->path = $path; $this->path = $path;
$this->packmask = $packmask; $this->packmask = $packmask;
$this->serverVersion = $serverVersion->version; $this->serverVersion = $serverVersion->version;
@ -102,7 +102,6 @@ class DedimaniaData {
$login = Player::parseLogin($login); $login = Player::parseLogin($login);
$maxRank = $this->serverMaxRank; $maxRank = $this->serverMaxRank;
foreach ($this->players as $player) { foreach ($this->players as $player) {
/** @var DedimaniaPlayer $player */
if ($player->login === $login) { if ($player->login === $login) {
if ($player->maxRank > $maxRank) { if ($player->maxRank > $maxRank) {
$maxRank = $player->maxRank; $maxRank = $player->maxRank;
@ -130,4 +129,4 @@ class DedimaniaData {
public function removePlayer($login) { public function removePlayer($login) {
unset($this->players[$login]); unset($this->players[$login]);
} }
} }

View File

@ -706,7 +706,6 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
if ($record->rank > $this->dedimaniaData->serverMaxRank) { if ($record->rank > $this->dedimaniaData->serverMaxRank) {
break; break;
} }
if (!$record->newRecord) { if (!$record->newRecord) {
continue; continue;
} }