Improved PHPDoc, Type Hints & Parameter Names

This commit is contained in:
Steffen Schröder
2014-05-13 16:40:05 +02:00
parent 3e69e03292
commit 2a705e05d9
27 changed files with 434 additions and 447 deletions

View File

@@ -71,7 +71,7 @@ class RankingManager implements CallbackListener {
/**
* Update Game Rankings (never call this Method)
*
* @param $data
* @param string $data
*/
public function updateRankings($data) {
if (!is_string($data)) {

View File

@@ -4,8 +4,9 @@ namespace ManiaControl\Server;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\Utils\CommandLineHelper;
use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
use ManiaControl\Utils\CommandLineHelper;
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
/**
@@ -260,10 +261,11 @@ class Server implements CallbackListener {
/**
* Retrieve Validation Replay for the given Player
*
* @param $login
* @param string $login
* @return string
*/
public function getValidationReplay($login) {
$login = Player::parseLogin($login);
try {
$replay = $this->maniaControl->client->getValidationReplay($login);
} catch (Exception $e) {
@@ -279,7 +281,7 @@ class Server implements CallbackListener {
/**
* Retrieve Ghost Replay for the given Player
*
* @param $login
* @param string $login
* @return string
*/
public function getGhostReplay($login) {
@@ -289,6 +291,7 @@ class Server implements CallbackListener {
}
// Build file name
$login = Player::parseLogin($login);
$map = $this->maniaControl->mapManager->getCurrentMap();
$gameMode = $this->getGameMode();
$time = time();

View File

@@ -210,12 +210,9 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
}
/**
* Check stuff each 5 seconds
*
* @param $timer
* @return bool
* Check Stuff each 5 Seconds
*/
public function each5Seconds($timer) {
public function each5Seconds() {
// Empty shutdown
if ($this->serverShutdownEmpty) {
$players = $this->maniaControl->playerManager->getPlayers();