'Siege', 'key' => 'won'], ['label' => 'Unentschieden', 'key' => 'drawn'], ['label' => 'Niederlagen', 'key' => 'lost'], ['label' => 'Tordifferenz', 'key' => 'goal_diff', 'signed' => true], ['label' => 'Punkte', 'key' => 'points'], ]; $format = static function (?array $row, string $key, bool $signed = false): string { if ($row === null || !array_key_exists($key, $row)) { return '–'; } $value = (int) $row[$key]; return $signed && $value > 0 ? '+' . $value : (string) $value; }; // Balkenlänge als KLASSE, nie als style-Attribut: die CSP verwirft inline // styles stillschweigend (siehe CLAUDE.md), der Balken wäre in Produktion // unsichtbar. Deshalb 5-Prozent-Stufen, die components.css ausdefiniert. $barStep = static function (?array $row, ?array $other, string $key): int { if ($row === null) { return 0; } $value = abs((int) ($row[$key] ?? 0)); $scale = max($value, $other === null ? 0 : abs((int) ($other[$key] ?? 0))); if ($scale <= 0) { return 0; } return (int) round($value / $scale * 20); }; // Ein Satz statt einer Zahlenkolonne: derselbe Bestand, nur in Sprache. Die // erste zutreffende Regel gewinnt, damit immer genau eine Aussage dasteht. $zahlwort = static function (int $n): string { $woerter = [0 => 'Kein', 1 => 'Ein', 2 => 'Zwei', 3 => 'Drei', 4 => 'Vier', 5 => 'Fünf', 6 => 'Sechs', 7 => 'Sieben', 8 => 'Acht', 9 => 'Neun', 10 => 'Zehn', 11 => 'Elf', 12 => 'Zwölf', 13 => 'Dreizehn', 14 => 'Vierzehn', 15 => 'Fünfzehn']; return $woerter[$n] ?? (string) $n; }; $aufmacher = ''; if ($opponent !== null) { $played = (int) ($opponent['played'] ?? 0); $won = (int) ($opponent['won'] ?? 0); $lost = (int) ($opponent['lost'] ?? 0); $rank = (int) ($opponent['rank'] ?? 0); $points = (int) ($opponent['points'] ?? 0); $diff = (int) ($opponent['goal_diff'] ?? 0); if ($played > 0 && $lost === 0) { $aufmacher = 'Noch ohne Niederlage'; } elseif ($played > 0 && $won === 0) { $aufmacher = 'Noch ohne Sieg'; } elseif ($played > 0 && $won / $played >= 0.7) { $aufmacher = $zahlwort($won) . ' Siege aus ' . mb_strtolower($zahlwort($played)) . ' Spielen'; } elseif ($rank === 1) { $aufmacher = 'Tabellenführer mit ' . $points . ' Punkten'; } elseif ($played > 0 && $diff <= -8) { $aufmacher = $zahlwort(abs($diff)) . ' Tore mehr kassiert als geschossen'; } elseif ($played > 0 && $diff >= 8) { $aufmacher = $zahlwort($diff) . ' Tore mehr geschossen als kassiert'; } elseif ($played > 0) { $aufmacher = $points . ' Punkte aus ' . $played . ' Spielen'; } } $spieltagInfo = $opponent !== null && (int) ($opponent['played'] ?? 0) > 0 ? 'Stand nach ' . (int) $opponent['played'] . ' Spieltagen' : ''; ?>

$ownCrest, 'name' => $ownName]); ?>


Uhr

$gegnerCrest, 'name' => $gegnerLabel]); ?>

Wir Gegner

Die aktuellen Vergleichsdaten waren beim letzten Abruf nicht verfügbar.

Die Tabelle dazwischen

$block, 'caption' => 'Tabellenausschnitt ' . (string) ($info['league'] ?? '')]); ?>