From e3610be2fb96b0ae9e7e386efe6b556c274256bc Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Wed, 1 May 2019 20:10:23 +0200 Subject: [PATCH] Updated Showing the pairings of a specific player (markdown) --- Showing-the-pairings-of-a-specific-player.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Showing-the-pairings-of-a-specific-player.md b/Showing-the-pairings-of-a-specific-player.md index a8ada23..eb9716e 100644 --- a/Showing-the-pairings-of-a-specific-player.md +++ b/Showing-the-pairings-of-a-specific-player.md @@ -21,11 +21,12 @@ foreach ($magnus->getPairings() as $pairing) { if (!is_null($pairing->getOpponent())) { $opponent = $pairing->getOpponent()->getName(); $color = $pairing->getColor()->getKey(); - echo $player . ' against ' . $opponent . ' using ' . $color . PHP_EOL; - } elseif ($pairing->getResult() == Result::bye ) { + echo $player . ' ' . $pairing->getResult()->getKey() . ' against ' . $opponent . ' using ' . $color . PHP_EOL; + } elseif ($pairing->getResult() == Result::bye) { echo $player . ' is bye' . PHP_EOL; - } elseif ($pairing->getResult() == Result::absent ) { - echo $player . ' is absent' . PHP_EOL; + } elseif ($pairing->getResult() == Result::absent) { + echo $player . ' is absent' . PHP_EOL; } } + ``` \ No newline at end of file