prettified code

This commit is contained in:
kremsy 2017-05-19 23:55:45 +02:00
parent a6831be5be
commit 468f937b2e
2 changed files with 20 additions and 22 deletions

View File

@ -14,8 +14,6 @@ use ManiaControl\Callbacks\Callbacks;
use ManiaControl\Callbacks\Structures\TrackMania\OnWayPointEventStructure; use ManiaControl\Callbacks\Structures\TrackMania\OnWayPointEventStructure;
use ManiaControl\Callbacks\TimerListener; use ManiaControl\Callbacks\TimerListener;
use ManiaControl\Commands\CommandListener; use ManiaControl\Commands\CommandListener;
use ManiaControl\Files\AsyncHttpRequest;
use ManiaControl\Logger;
use ManiaControl\ManiaControl; use ManiaControl\ManiaControl;
use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkManager;
use ManiaControl\Players\Player; use ManiaControl\Players\Player;
@ -34,23 +32,23 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
/* /*
* Constants * Constants
*/ */
const ID = 8; const ID = 8;
const VERSION = 0.2; const VERSION = 0.2;
const AUTHOR = 'MCTeam'; const AUTHOR = 'MCTeam';
const NAME = 'Dedimania Plugin'; const NAME = 'Dedimania Plugin';
const MLID_DEDIMANIA = 'Dedimania.ManialinkId'; const MLID_DEDIMANIA = 'Dedimania.ManialinkId';
const SETTING_WIDGET_ENABLE = 'Enable Dedimania Widget'; const SETTING_WIDGET_ENABLE = 'Enable Dedimania Widget';
const SETTING_WIDGET_TITLE = 'Widget Title'; const SETTING_WIDGET_TITLE = 'Widget Title';
const SETTING_WIDGET_POSX = 'Widget Position: X'; const SETTING_WIDGET_POSX = 'Widget Position: X';
const SETTING_WIDGET_POSY = 'Widget Position: Y'; const SETTING_WIDGET_POSY = 'Widget Position: Y';
const SETTING_WIDGET_WIDTH = 'Widget Width'; const SETTING_WIDGET_WIDTH = 'Widget Width';
const SETTING_WIDGET_LINE_COUNT = 'Widget Displayed Lines Count'; const SETTING_WIDGET_LINE_COUNT = 'Widget Displayed Lines Count';
const SETTING_WIDGET_LINE_HEIGHT = 'Widget Line Height'; const SETTING_WIDGET_LINE_HEIGHT = 'Widget Line Height';
const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for '; const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for ';
const CB_DEDIMANIA_CHANGED = 'Dedimania.Changed'; const CB_DEDIMANIA_CHANGED = 'Dedimania.Changed';
const CB_DEDIMANIA_UPDATED = 'Dedimania.Updated'; const CB_DEDIMANIA_UPDATED = 'Dedimania.Updated';
const ACTION_SHOW_DEDIRECORDSLIST = 'Dedimania.ShowDediRecordsList'; const ACTION_SHOW_DEDIRECORDSLIST = 'Dedimania.ShowDediRecordsList';
/* /*
* Private properties * Private properties
@ -58,7 +56,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
/** @var ManiaControl $maniaControl */ /** @var ManiaControl $maniaControl */
private $maniaControl = null; private $maniaControl = null;
private $checkpoints = array(); private $checkpoints = array();
/** @var \MCTeam\Dedimania\DedimaniaWebHandler $webHandler */ /** @var \MCTeam\Dedimania\DedimaniaWebHandler $webHandler */
private $webHandler = null; private $webHandler = null;
@ -526,7 +524,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
$validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login); $validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login);
if ($validationReplay) { if ($validationReplay) {
$record->vReplay = $validationReplay; $record->vReplay = $validationReplay;
}else{ } else {
return; return;
} }

View File

@ -10,8 +10,8 @@ use ManiaControl\Players\Player;
/** /**
* ManiaControl Dedimania Webhandler Class for Dedimania Plugin * ManiaControl Dedimania Webhandler Class for Dedimania Plugin
*
* Notice its not completely finished yet * Notice its not completely finished yet
*
* @author ManiaControl Team <mail@maniacontrol.com> * @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team * @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -279,7 +279,7 @@ class DedimaniaWebHandler {
// Called method response // Called method response
if (!$methodResponse[0]) { if (!$methodResponse[0]) {
Logger::logError("Records Plugin: Submitting dedimania records failed."); Logger::logError("Records Plugin: Submitting dedimania records failed.");
}else{ } else {
Logger::log("Dedimania Times succesfully submitted"); Logger::log("Dedimania Times succesfully submitted");
} }