updated test

This commit is contained in:
Jeroen De Meerleer 2019-06-01 16:32:23 +02:00
parent 11dd03b9e6
commit 21d105627e
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -81,7 +81,8 @@ foreach ($sws->getTournament()->getRanking() as $player) {
echo str_pad($player->getName() . '(' . $player->getElo($sws->getTournament()->getPriorityElo()) . ') ', 35) . implode_pad(' ', $player->getTiebreaks(), 5, ' ') . PHP_EOL; echo str_pad($player->getName() . '(' . $player->getElo($sws->getTournament()->getPriorityElo()) . ') ', 35) . implode_pad(' ', $player->getTiebreaks(), 5, ' ') . PHP_EOL;
} }
function implode_pad ($glue, $collection, $padlength, $padstring): string { function implode_pad($glue, $collection, $padlength, $padstring): string
{
$newarray = []; $newarray = [];
foreach ($collection as $elem) { foreach ($collection as $elem) {
$newarray[] = str_pad($elem, $padlength, $padstring); $newarray[] = str_pad($elem, $padlength, $padstring);