type hints
resolved warnings
This commit is contained in:
parent
f9a3c0f72e
commit
c059d7316c
@ -3,6 +3,7 @@
|
||||
namespace ManiaControl\Commands;
|
||||
|
||||
use FML\Controls\Frame;
|
||||
use FML\Controls\Label;
|
||||
use FML\Controls\Quads\Quad_BgsPlayerCard;
|
||||
use FML\ManiaLink;
|
||||
use FML\Script\Features\Paging;
|
||||
@ -228,7 +229,10 @@ class HelpManager implements CommandListener, CallbackListener {
|
||||
|
||||
$array = array($command['Name'] => $x + 5, $command['Description'] => $x + 50);
|
||||
$labels = $this->maniaControl->manialinkManager->labelLine($playerFrame, $array);
|
||||
$labels[0]->setWidth(40);
|
||||
|
||||
/** @var Label $label */
|
||||
$label = $labels[0];
|
||||
$label->setWidth(40);
|
||||
|
||||
$y -= 4;
|
||||
$i++;
|
||||
|
@ -234,6 +234,7 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
|
||||
|
||||
$pageFrame = null;
|
||||
$index = 0;
|
||||
$y = 0;
|
||||
foreach ($settings as $setting) {
|
||||
if (!$pageFrame) {
|
||||
$pageFrame = new Frame();
|
||||
|
@ -36,10 +36,18 @@ class Database implements TimerListener {
|
||||
$user = $this->maniaControl->config->database->xpath('user');
|
||||
$pass = $this->maniaControl->config->database->xpath('pass');
|
||||
|
||||
if (!$host) trigger_error("Invalid database configuration (host).", E_USER_ERROR);
|
||||
if (!$port) trigger_error("Invalid database configuration (port).", E_USER_ERROR);
|
||||
if (!$user) trigger_error("Invalid database configuration (user).", E_USER_ERROR);
|
||||
if (!$pass) trigger_error("Invalid database configuration (pass).", E_USER_ERROR);
|
||||
if (!$host) {
|
||||
trigger_error("Invalid database configuration (host).", E_USER_ERROR);
|
||||
}
|
||||
if (!$port) {
|
||||
trigger_error("Invalid database configuration (port).", E_USER_ERROR);
|
||||
}
|
||||
if (!$user) {
|
||||
trigger_error("Invalid database configuration (user).", E_USER_ERROR);
|
||||
}
|
||||
if (!$pass) {
|
||||
trigger_error("Invalid database configuration (pass).", E_USER_ERROR);
|
||||
}
|
||||
|
||||
$host = (string) $host[0];
|
||||
$port = (int) $port[0];
|
||||
|
@ -79,6 +79,7 @@ class ManiaControl implements CommandListener, TimerListener {
|
||||
public $server = null;
|
||||
public $settingManager = null;
|
||||
public $statisticManager = null;
|
||||
/** @var UpdateManager $updateManager */
|
||||
public $updateManager = null;
|
||||
public $errorHandler = null;
|
||||
public $timerManager = null;
|
||||
|
@ -220,7 +220,8 @@ class PluginManager {
|
||||
continue;
|
||||
}
|
||||
array_push($newPluginClasses, $className);
|
||||
|
||||
|
||||
/** @var Plugin $className */
|
||||
$className::prepare($this->maniaControl);
|
||||
|
||||
if ($this->getSavedPluginStatus($className)) {
|
||||
|
@ -166,6 +166,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
|
||||
if (!isset($pluginsData[$pluginId])) {
|
||||
continue;
|
||||
}
|
||||
/** @var PluginUpdateData $pluginData */
|
||||
$pluginData = $pluginsData[$pluginId];
|
||||
$pluginVersion = $pluginClass::getVersion();
|
||||
if ($pluginData->isNewerThan($pluginVersion)) {
|
||||
@ -301,6 +302,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
|
||||
*/
|
||||
$pluginId = $pluginClass::getId();
|
||||
if (isset($pluginsUpdates[$pluginId])) {
|
||||
/** @var PluginUpdateData $pluginUpdateData */
|
||||
$pluginUpdateData = $pluginsUpdates[$pluginId];
|
||||
$pluginVersion = $pluginClass::getVersion();
|
||||
if ($pluginUpdateData->isNewerThan($pluginVersion)) {
|
||||
|
Loading…
Reference in New Issue
Block a user