From 468f937b2e0bc09072c104d05cd47a629168af08 Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 19 May 2017 23:55:45 +0200 Subject: [PATCH] prettified code --- plugins/MCTeam/Dedimania/DedimaniaPlugin.php | 38 +++++++++---------- .../MCTeam/Dedimania/DedimaniaWebHandler.php | 4 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php index f6816074..008387f9 100644 --- a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php +++ b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php @@ -14,8 +14,6 @@ use ManiaControl\Callbacks\Callbacks; use ManiaControl\Callbacks\Structures\TrackMania\OnWayPointEventStructure; use ManiaControl\Callbacks\TimerListener; use ManiaControl\Commands\CommandListener; -use ManiaControl\Files\AsyncHttpRequest; -use ManiaControl\Logger; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Players\Player; @@ -34,23 +32,23 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene /* * Constants */ - const ID = 8; - const VERSION = 0.2; - const AUTHOR = 'MCTeam'; - const NAME = 'Dedimania Plugin'; - const MLID_DEDIMANIA = 'Dedimania.ManialinkId'; + const ID = 8; + const VERSION = 0.2; + const AUTHOR = 'MCTeam'; + const NAME = 'Dedimania Plugin'; + const MLID_DEDIMANIA = 'Dedimania.ManialinkId'; - const SETTING_WIDGET_ENABLE = 'Enable Dedimania Widget'; - const SETTING_WIDGET_TITLE = 'Widget Title'; - const SETTING_WIDGET_POSX = 'Widget Position: X'; - const SETTING_WIDGET_POSY = 'Widget Position: Y'; - const SETTING_WIDGET_WIDTH = 'Widget Width'; - const SETTING_WIDGET_LINE_COUNT = 'Widget Displayed Lines Count'; - const SETTING_WIDGET_LINE_HEIGHT = 'Widget Line Height'; - const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for '; - const CB_DEDIMANIA_CHANGED = 'Dedimania.Changed'; - const CB_DEDIMANIA_UPDATED = 'Dedimania.Updated'; - const ACTION_SHOW_DEDIRECORDSLIST = 'Dedimania.ShowDediRecordsList'; + const SETTING_WIDGET_ENABLE = 'Enable Dedimania Widget'; + const SETTING_WIDGET_TITLE = 'Widget Title'; + const SETTING_WIDGET_POSX = 'Widget Position: X'; + const SETTING_WIDGET_POSY = 'Widget Position: Y'; + const SETTING_WIDGET_WIDTH = 'Widget Width'; + const SETTING_WIDGET_LINE_COUNT = 'Widget Displayed Lines Count'; + const SETTING_WIDGET_LINE_HEIGHT = 'Widget Line Height'; + const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for '; + const CB_DEDIMANIA_CHANGED = 'Dedimania.Changed'; + const CB_DEDIMANIA_UPDATED = 'Dedimania.Updated'; + const ACTION_SHOW_DEDIRECORDSLIST = 'Dedimania.ShowDediRecordsList'; /* * Private properties @@ -58,7 +56,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene /** @var ManiaControl $maniaControl */ private $maniaControl = null; - private $checkpoints = array(); + private $checkpoints = array(); /** @var \MCTeam\Dedimania\DedimaniaWebHandler $webHandler */ private $webHandler = null; @@ -526,7 +524,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene $validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login); if ($validationReplay) { $record->vReplay = $validationReplay; - }else{ + } else { return; } diff --git a/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php b/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php index 6f4244ba..bf84e3dd 100644 --- a/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php +++ b/plugins/MCTeam/Dedimania/DedimaniaWebHandler.php @@ -10,8 +10,8 @@ use ManiaControl\Players\Player; /** * ManiaControl Dedimania Webhandler Class for Dedimania Plugin - * * Notice its not completely finished yet + * * @author ManiaControl Team * @copyright 2014-2017 ManiaControl Team * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 @@ -279,7 +279,7 @@ class DedimaniaWebHandler { // Called method response if (!$methodResponse[0]) { Logger::logError("Records Plugin: Submitting dedimania records failed."); - }else{ + } else { Logger::log("Dedimania Times succesfully submitted"); }