performed code formatting

This commit is contained in:
Steffen Schröder
2014-08-05 02:17:41 +02:00
parent 98b5f132dc
commit 28d2c08936
66 changed files with 4054 additions and 1901 deletions

View File

@ -69,7 +69,8 @@ class StatisticManager {
* @return bool
*/
private function initTables() {
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
$mysqli = $this->maniaControl->getDatabase()
->getMysqli();
$query = "CREATE TABLE IF NOT EXISTS `" . self::TABLE_STATMETADATA . "` (
`index` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
@ -117,7 +118,8 @@ class StatisticManager {
* Store Stats Meta Data from the Database
*/
private function storeStatMetaData() {
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
$mysqli = $this->maniaControl->getDatabase()
->getMysqli();
$query = "SELECT * FROM `" . self::TABLE_STATMETADATA . "`;";
$result = $mysqli->query($query);
@ -202,7 +204,8 @@ class StatisticManager {
return $this->getStatsRankingOfSpecialStat($statName, $serverIndex);
}
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
$mysqli = $this->maniaControl->getDatabase()
->getMysqli();
$statId = $this->getStatId($statName);
$query = "SELECT `playerId`, `serverIndex`, `value` FROM `" . self::TABLE_STATISTICS . "`
@ -491,7 +494,8 @@ class StatisticManager {
return intval($hits) / intval($shots);
}
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
$mysqli = $this->maniaControl->getDatabase()
->getMysqli();
$statId = $this->getStatId($statName);
if (!$statId) {
@ -563,7 +567,8 @@ class StatisticManager {
$serverIndex = $this->maniaControl->getServer()->index;
}
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
$mysqli = $this->maniaControl->getDatabase()
->getMysqli();
$query = "INSERT INTO `" . self::TABLE_STATISTICS . "` (
`serverIndex`,
`playerId`,
@ -598,7 +603,8 @@ class StatisticManager {
* @return bool
*/
public function defineStatMetaData($statName, $type = self::STAT_TYPE_INT, $statDescription = '') {
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
$mysqli = $this->maniaControl->getDatabase()
->getMysqli();
$query = "INSERT INTO `" . self::TABLE_STATMETADATA . "` (
`name`,
`type`,