phpdoc + coding improvements #3

This commit is contained in:
Steffen Schröder 2014-05-27 23:00:39 +02:00
parent 8b89289784
commit 736507fccf
6 changed files with 9 additions and 12 deletions

View File

@ -128,8 +128,6 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$index = 0;
$y = 0;
foreach ($settings as $setting) {
/** @var Setting $setting */
if (!$pageFrame) {
$pageFrame = new Frame();
$frame->add($pageFrame);

View File

@ -113,7 +113,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
$requester = $nextQueued[0];
/** @var Map $map */
$map = $nextQueued[1];
$this->maniaControl->chat->sendInformation("Next Map is $<{$map->nam}$> from $<{$map->authorNick}$> requested by $<{$requester->nickname}$>.", $player);
$this->maniaControl->chat->sendInformation("Next Map is $<{$map->name}$> from $<{$map->authorNick}$> requested by $<{$requester->nickname}$>.", $player);
} else {
$mapIndex = $this->maniaControl->client->getNextMapIndex();
$maps = $this->maniaControl->mapManager->getMaps();

View File

@ -153,7 +153,7 @@ class Server implements CallbackListener {
/**
* Gets all Servers from the Database
*
* @return array
* @return \stdClass[]
*/
public function getAllServers() {
$mysqli = $this->maniaControl->database->mysqli;

View File

@ -429,7 +429,7 @@ class SettingManager implements CallbackListener {
* Get all Settings for the given Class
*
* @param mixed $object
* @return array
* @return Setting[]
*/
public function getSettingsByClass($object) {
$className = ClassUtil::getClass($object);
@ -453,7 +453,7 @@ class SettingManager implements CallbackListener {
/**
* Get all Settings
*
* @return array
* @return Setting[]
*/
public function getSettings() {
$mysqli = $this->maniaControl->database->mysqli;
@ -476,7 +476,7 @@ class SettingManager implements CallbackListener {
* Get all Setting Classes
*
* @param bool $hidePluginClasses
* @return array
* @return string[]
*/
public function getSettingClasses($hidePluginClasses = false) {
$mysqli = $this->maniaControl->database->mysqli;

View File

@ -85,7 +85,7 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
/**
* Get the possible Update Channels
*
* @return array
* @return string[]
*/
public function getUpdateChannels() {
// TODO: change default channel on release

View File

@ -1123,11 +1123,10 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
* @return array|RecordData
*/
public function getDedimaniaRecords() {
if (!$this->dedimaniaData->records) {
return null;
if ($this->dedimaniaData->records) {
return $this->dedimaniaData->records;
}
$records = $this->dedimaniaData->records;
return $records;
return null;
}
/**