fixed number mismatch declerations
code cleanups
This commit is contained in:
parent
06b3893a27
commit
f31a1c1782
@ -3,8 +3,6 @@
|
||||
namespace ManiaControl\Callbacks\Structures\Common;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
@ -5,8 +5,6 @@ namespace ManiaControl\Callbacks\Structures\Common;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\Models\CommonPlayerScore;
|
||||
use ManiaControl\Callbacks\Structures\ShootMania\Models\TeamScore;
|
||||
use ManiaControl\General\JsonSerializable;
|
||||
use ManiaControl\General\JsonSerializeTrait;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Callbacks\Structures\ManiaPlanet;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
||||
/**
|
||||
* Structure Class for the OnArmorEmpty Structure Callback
|
||||
|
@ -4,8 +4,8 @@ namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\Callbacks\Structures\ShootMania\Models\Landmark;
|
||||
use ManiaControl\Callbacks\Structures\ShootMania\Models\Position;
|
||||
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Players\Player;
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Structure Class for the Default Event Structure Callback
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
||||
/**
|
||||
* Structure Class for the OnNearMiss Structure Callback
|
||||
|
@ -4,9 +4,7 @@ namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BasePlayerTimeStructure;
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Players\Player;
|
||||
|
||||
|
||||
/**
|
||||
* Structure Class for the OnPlayerRequestRespawnStructure Structure Callback
|
||||
|
@ -5,7 +5,7 @@ namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\CommonScoresStructure;
|
||||
use ManiaControl\Callbacks\Structures\ShootMania\Models\PlayerScore;
|
||||
use ManiaControl\Callbacks\Structures\ShootMania\Models\TeamScore;
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Players\Player;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
namespace ManiaControl\Callbacks\Structures\TrackMania;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
||||
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
||||
|
||||
|
||||
use ManiaControl\Callbacks\Structures\ShootMania\CommonDefaultEventStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
|
||||
/**
|
||||
* Structure Class for the Default Event Structure Callback
|
||||
|
@ -6,7 +6,7 @@ namespace ManiaControl\Callbacks\Structures\TrackMania;
|
||||
use ManiaControl\Callbacks\Models\RecordCallback;
|
||||
use ManiaControl\Callbacks\Structures\Common\BasePlayerTimeStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Utils\Formatter;
|
||||
|
||||
|
||||
/**
|
||||
* Structure Class for the On Respawn Structure Callback
|
||||
|
@ -28,7 +28,7 @@ class MXMapInfo {
|
||||
*
|
||||
* @param String $prefix MX URL prefix
|
||||
* @param $mx
|
||||
* @return MXMapInfo
|
||||
* @return \ManiaControl\ManiaExchange\MXMapInfo|void
|
||||
*/
|
||||
public function __construct($prefix, $mx) {
|
||||
$this->prefix = $prefix;
|
||||
|
@ -12,7 +12,7 @@ use FML\Controls\Quads\Quad_BgRaceScore2;
|
||||
use FML\Controls\Quads\Quad_Bgs1InRace;
|
||||
use FML\Controls\Quads\Quad_BgsPlayerCard;
|
||||
use FML\Controls\Quads\Quad_Icons64x64_1;
|
||||
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
||||
|
||||
use FML\Script\Features\Paging;
|
||||
use FML\Script\Script;
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
|
@ -11,7 +11,6 @@ use FML\Script\Features\Paging;
|
||||
use FML\Script\Script;
|
||||
use ManiaControl\Admin\AuthenticationManager;
|
||||
use ManiaControl\Configurator\ConfiguratorMenu;
|
||||
use ManiaControl\Files\AsyncHttpRequest;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
|
@ -9,14 +9,12 @@ use ManiaControl\Admin\AuthenticationManager;
|
||||
use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\Callbacks;
|
||||
use ManiaControl\Callbacks\Structures\Common\StatusCallbackStructure;
|
||||
use ManiaControl\Callbacks\Structures\TrackMania\OnPointsRepartitionStructure;
|
||||
use ManiaControl\Callbacks\TimerListener;
|
||||
use ManiaControl\Commands\CommandListener;
|
||||
use ManiaControl\Logger;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\FaultException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Maps\Map;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
|
||||
|
||||
//TODO delete this class
|
||||
/**
|
||||
* Class managing Rankings
|
||||
*
|
||||
@ -109,7 +110,7 @@ class RankingManager implements CallbackListener, UsageInformationAble {
|
||||
array_multisort($this->rankings, SORT_DESC, SORT_NUMERIC);
|
||||
|
||||
//TODO if Local Records activated-> sort asc
|
||||
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::RANKINGSUPDATED, $this->getRankings());
|
||||
//$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::RANKINGSUPDATED, $this->getRankings());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -134,7 +135,7 @@ class RankingManager implements CallbackListener, UsageInformationAble {
|
||||
return $leaders;
|
||||
}
|
||||
// FIXME: $leader doesn't exist
|
||||
array_push($leaders, $leader);
|
||||
//array_push($leaders, $leader);
|
||||
$prev = $score;
|
||||
}
|
||||
return null;
|
||||
|
@ -5,19 +5,19 @@ namespace ManiaControl\Server;
|
||||
use FML\Components\CheckBox;
|
||||
use FML\Controls\Entry;
|
||||
use FML\Controls\Frame;
|
||||
use FML\Controls\Label;
|
||||
|
||||
use FML\Controls\Labels\Label_Text;
|
||||
use FML\Controls\Quad;
|
||||
use FML\Controls\Quads\Quad_Icons64x64_1;
|
||||
use FML\Script\Features\Paging;
|
||||
use FML\Script\Script;
|
||||
use FML\XmlRpc\UIProperties;
|
||||
|
||||
use ManiaControl\Admin\AuthenticationManager;
|
||||
use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\Callbacks;
|
||||
use ManiaControl\Callbacks\TimerListener;
|
||||
use ManiaControl\Callbacks\Structures\Common\UIPropertiesBaseStructure;
|
||||
use ManiaControl\Configurator\Configurator;
|
||||
|
||||
use ManiaControl\Configurator\ConfiguratorMenu;
|
||||
use ManiaControl\Logger;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace ManiaControl\Statistics;
|
||||
|
||||
use FML\Controls\Frame;
|
||||
use FML\Controls\Label;
|
||||
|
||||
use FML\Controls\Labels\Label_Text;
|
||||
use FML\Controls\Quad;
|
||||
use FML\Controls\Quads\Quad_BgsPlayerCard;
|
||||
@ -15,7 +15,7 @@ use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\CallbackManager;
|
||||
use ManiaControl\Callbacks\Callbacks;
|
||||
use ManiaControl\Commands\CommandListener;
|
||||
use ManiaControl\Logger;
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Manialinks\LabelLine;
|
||||
use ManiaControl\Manialinks\ManialinkManager;
|
||||
|
@ -225,7 +225,7 @@ abstract class Formatter implements UsageInformationAble {
|
||||
* Make sure the given Text is encoded in UTF-8
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
* @return array|string
|
||||
*/
|
||||
public static function utf8($text) {
|
||||
if (is_array($text)) {
|
||||
|
@ -4,7 +4,6 @@ namespace FML\Controls;
|
||||
|
||||
use FML\Script\Features\GraphCurve;
|
||||
use FML\Script\Features\GraphSettings;
|
||||
use FML\Script\Features\ScriptFeature;
|
||||
|
||||
/**
|
||||
* Graph Control
|
||||
@ -14,8 +13,7 @@ use FML\Script\Features\ScriptFeature;
|
||||
* @copyright FancyManiaLinks Copyright © 2017 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class Graph extends Control
|
||||
{
|
||||
class Graph extends Control {
|
||||
|
||||
/**
|
||||
* @var GraphSettings $graphSettings Graph settings
|
||||
@ -33,8 +31,7 @@ class Graph extends Control
|
||||
* @api
|
||||
* @return GraphSettings
|
||||
*/
|
||||
public function getSettings()
|
||||
{
|
||||
public function getSettings() {
|
||||
if (!$this->graphSettings) {
|
||||
$this->createSettings();
|
||||
}
|
||||
@ -46,8 +43,7 @@ class Graph extends Control
|
||||
*
|
||||
* @return GraphSettings
|
||||
*/
|
||||
protected function createSettings()
|
||||
{
|
||||
protected function createSettings() {
|
||||
$this->graphSettings = new GraphSettings($this);
|
||||
$this->addScriptFeature($this->graphSettings);
|
||||
return $this->graphSettings;
|
||||
@ -59,8 +55,7 @@ class Graph extends Control
|
||||
* @api
|
||||
* @return GraphCurve[]
|
||||
*/
|
||||
public function getCurves()
|
||||
{
|
||||
public function getCurves() {
|
||||
return $this->curves;
|
||||
}
|
||||
|
||||
@ -71,8 +66,7 @@ class Graph extends Control
|
||||
* @param GraphCurve $curve Curve
|
||||
* @return static
|
||||
*/
|
||||
public function addCurve(GraphCurve $curve)
|
||||
{
|
||||
public function addCurve(GraphCurve $curve) {
|
||||
$curve->setGraph($this);
|
||||
$this->addScriptFeature($curve);
|
||||
array_push($this->curves, $curve);
|
||||
@ -86,8 +80,7 @@ class Graph extends Control
|
||||
* @param GraphCurve[] $curves Curves
|
||||
* @return static
|
||||
*/
|
||||
public function addCurves(array $curves)
|
||||
{
|
||||
public function addCurves(array $curves) {
|
||||
foreach ($curves as $curve) {
|
||||
$this->addCurve($curve);
|
||||
}
|
||||
@ -97,16 +90,14 @@ class Graph extends Control
|
||||
/**
|
||||
* @see Control::getTagName()
|
||||
*/
|
||||
public function getTagName()
|
||||
{
|
||||
public function getTagName() {
|
||||
return "graph";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Control::getManiaScriptClass()
|
||||
*/
|
||||
public function getManiaScriptClass()
|
||||
{
|
||||
public function getManiaScriptClass() {
|
||||
return "CMlGraph";
|
||||
}
|
||||
|
||||
|
@ -2,11 +2,9 @@
|
||||
|
||||
namespace React\Socket;
|
||||
|
||||
use Evenement\EventEmitterInterface;
|
||||
use React\Stream\ReadableStreamInterface;
|
||||
use React\Stream\WritableStreamInterface;
|
||||
|
||||
interface ConnectionInterface extends ReadableStreamInterface, WritableStreamInterface
|
||||
{
|
||||
interface ConnectionInterface extends ReadableStreamInterface, WritableStreamInterface {
|
||||
public function getRemoteAddress();
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
* PHP Unit Test for Custom UI Manager
|
||||
*
|
||||
|
@ -15,7 +15,6 @@ use FML\Controls\Quads\Quad_Icons64x64_1;
|
||||
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
||||
use FML\ManiaLink;
|
||||
use FML\Script\Features\KeyAction;
|
||||
use ManiaControl\Admin\ActionsMenu;
|
||||
use ManiaControl\Callbacks\CallbackListener;
|
||||
use ManiaControl\Callbacks\CallbackManager;
|
||||
use ManiaControl\Callbacks\Callbacks;
|
||||
@ -37,7 +36,6 @@ use ManiaControl\Settings\SettingManager;
|
||||
use ManiaControl\Utils\ColorUtil;
|
||||
use Maniaplanet\DedicatedServer\Structures\VoteRatio;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\ChangeInProgressException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\FaultException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
|
||||
|
||||
|
||||
|
@ -10,7 +10,6 @@ use FML\Controls\Quads\Quad_BgRaceScore2;
|
||||
use FML\Controls\Quads\Quad_BgsPlayerCard;
|
||||
use FML\ManiaLink;
|
||||
use FML\Script\Features\Paging;
|
||||
use ManiaControl\Admin\ActionsMenu;
|
||||
use ManiaControl\Admin\AuthenticationManager;
|
||||
use ManiaControl\Bills\BillManager;
|
||||
use ManiaControl\Callbacks\CallbackListener;
|
||||
|
@ -736,7 +736,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* Get all players votes
|
||||
*
|
||||
* @param Map $map
|
||||
* @return array
|
||||
* @return array|bool
|
||||
*/
|
||||
public function getMapPlayerVotes(Map $map) {
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
@ -893,7 +893,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* Get the current Votes for the Map
|
||||
*
|
||||
* @param Map $map
|
||||
* @return array
|
||||
* @return array|bool
|
||||
*/
|
||||
public function getMapVotes(Map $map) {
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
|
Loading…
Reference in New Issue
Block a user