[wip] code smell, psr-12, mvc, other, forgot by 1 year.

This commit is contained in:
2023-01-24 19:04:15 +02:00
parent 775a56c4c8
commit 2bb6bef614
13 changed files with 254 additions and 112 deletions
+7 -4
View File
@@ -7,7 +7,6 @@
use Battles\Chat;
use Battles\Database\Db;
use Battles\DressedItems;
use Battles\InventoryItem;
use Battles\Travel;
use Battles\User;
@@ -25,7 +24,11 @@ if (User::getInstance()->getBlock()) {
}
//Проверки на соответствие скрипта и комнаты, которые были натыканы по всем файлам.
Travel::roomRedirects(User::getInstance()->getRoom(), User::getInstance()->getBattle(), User::getInstance()->getInTower());
Travel::roomRedirects(
User::getInstance()->getRoom(),
User::getInstance()->getBattle(),
User::getInstance()->getInTower()
);
///*
// * Проверки на соответствие скрипта и комнаты, которые были натыканы по всем файлам.
@@ -220,7 +223,7 @@ function showhrefmagic(array $dress): string
return $r;
}
function timeOut($ttm)
function timeOut($ttm): string
{
$out = '';
$time_still = $ttm;
@@ -281,7 +284,7 @@ function addActions($time, $vars, $vls, $uid)
return $ins;
}
// использовать магию
// использовать магию (встроить в предмет?)
function usemagic($id, $target)
{
$user = Db::getInstance()->fetch('select * from users where id = ?', $_SESSION['uid']);