mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-19 03:04:29 +02:00
Fix PHPStan errors
This commit is contained in:
parent
b6e0184386
commit
88a0bc82d7
@ -2,7 +2,10 @@
|
||||
|
||||
use MyAAC\Settings;
|
||||
|
||||
$up = function () use ($db) {
|
||||
function updateHighscoresIdsHidden(): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (!$db->hasTable('players')) {
|
||||
return;
|
||||
}
|
||||
@ -19,6 +22,10 @@ $up = function () use ($db) {
|
||||
|
||||
$settings = Settings::getInstance();
|
||||
$settings->updateInDatabase('core', 'highscores_ids_hidden', implode(', ', $highscores_ignored_ids));
|
||||
}
|
||||
|
||||
$up = function () {
|
||||
updateHighscoresIdsHidden();
|
||||
};
|
||||
|
||||
$down = function () {
|
||||
|
@ -9,7 +9,7 @@ $up = function () use ($db) {
|
||||
}
|
||||
};
|
||||
|
||||
$down = function () use ($db) {
|
||||
$down = function () {
|
||||
// we don't want data loss
|
||||
//$db->dropColumn(TABLE_PREFIX . 'account_actions', 'ipv6');
|
||||
};
|
||||
|
@ -11,6 +11,6 @@ $up = function () use ($db) {
|
||||
$db->modifyColumn(TABLE_PREFIX . 'visitors', 'ip', 'VARCHAR(15) NOT NULL');
|
||||
};
|
||||
|
||||
$down = function () use ($db) {
|
||||
$down = function () {
|
||||
// nothing to be done, as we have just extended the size of a column
|
||||
};
|
||||
|
@ -10,7 +10,7 @@ $up = function () use ($db) {
|
||||
}
|
||||
};
|
||||
|
||||
$down = function () use ($db) {
|
||||
$down = function () {
|
||||
// will break the aac
|
||||
//if ($db->hasTable(TABLE_PREFIX . 'settings')) {
|
||||
// $db->dropTable(TABLE_PREFIX . 'settings');
|
||||
|
@ -5,8 +5,9 @@
|
||||
|
||||
// 2023-11-11
|
||||
// execute highscores_ids_hidden once again, cause of settings
|
||||
$up = function () use ($db) {
|
||||
$up = function () {
|
||||
require __DIR__ . '/20.php';
|
||||
updateHighscoresIdsHidden();
|
||||
};
|
||||
|
||||
$down = function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user