Private
Public Access
1
0

chg: pkg: upgrade the doctrine related back-end pkgs to the latest available version #7

This commit is contained in:
2026-04-20 09:05:36 +02:00
parent 5f856e4d70
commit 175581cdd5
30 changed files with 456 additions and 1015 deletions

View File

@@ -54,7 +54,7 @@ class BattleCardGenerator
public function generate(PlayedGame $game): string
{
$path = $this->cachePath((int)$game->getId());
$path = $this->cachePath((int)$game->id);
// Always regenerate to ensure bonus points are included
if (is_file($path)) {
@@ -108,13 +108,13 @@ class BattleCardGenerator
imageline($im, self::WIDTH / 2, 110, self::WIDTH / 2, self::HEIGHT - 80, $divider);
/** Resolve names*/
$redName = $game->getRed()?->getUsername()
?? ($game->getRedAnon() !== null ? 'Anonymous' : 'Guest');
$blueName = $game->getBlue()?->getUsername()
?? ($game->getBlueAnon() !== null ? 'Anonymous' : 'Guest');
$redPts = $game->getRedPoints();
$bluePts = $game->getBluePoints();
$resign = $game->getResign();
$redName = $game->red?->getUsername()
?? ($game->redAnon !== null ? 'Anonymous' : 'Guest');
$blueName = $game->blue?->getUsername()
?? ($game->blueAnon !== null ? 'Anonymous' : 'Guest');
$redPts = $game->redPoints;
$bluePts = $game->bluePoints;
$resign = $game->resign;
/** Winner*/
$winner = null;
@@ -135,8 +135,8 @@ class BattleCardGenerator
$this->centeredText($im, 'BLUE', 16, 980, 130, $blue);
/** Draw avatars below the team labels (moved down by 60px total: 200 → 260)*/
$redAvatar = $game->getRed()?->getAvatarPath();
$blueAvatar = $game->getBlue()?->getAvatarPath();
$redAvatar = $game->red?->avatarPath;
$blueAvatar = $game->blue?->avatarPath;
$this->drawAvatar($im, $redAvatar, 220, 260, $red, $redName);
$this->drawAvatar($im, $blueAvatar, 980, 260, $blue, $blueName);
@@ -156,8 +156,8 @@ class BattleCardGenerator
$this->centeredText($im, $scoreText, 72, self::WIDTH / 2, 390, $white);
/** Bonus points below score*/
$redBonusPoints = $game->getRedBonusPoints() ?? 0;
$blueBonusPoints = $game->getBlueBonusPoints() ?? 0;
$redBonusPoints = $game->redBonusPoints ?? 0;
$blueBonusPoints = $game->blueBonusPoints ?? 0;
$bonusText = number_format((float)$redBonusPoints, 1, '.', '') . ' * : * ' . number_format((float)$blueBonusPoints, 1, '.', '');
$this->centeredText($im, $bonusText, 24, self::WIDTH / 2, 425, $gold);