Merge branch 'bugfix/baumbachwrong' into develop

This commit is contained in:
Jeroen De Meerleer 2019-09-27 17:45:53 +02:00
commit 90e53032da
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 7 additions and 4 deletions

View File

@ -5,9 +5,10 @@
* NEW FEATURE: `Tournament::getArbiters` for multiple arbiters in 1 tournament
* ENHANCEMENT: `Class::getBinaryData` methods return null if field is non-existent
* CHANGE: `Tournament::getArbiter` accepts a `int` parameter representing the order of the arbiters
* BUGFIX: `Player:getId` returns elo instead of id
* BUGFIX: `Player:getId` returned elo instead of id
* BUGFIX: `Tournament::calculateBuchholz` did not return the correct score when player had unplayed rounds
* BUGFIX: `Tournament::calculateMutualResult` Returned NULL if result was invalid
* BUGFIX: `Tournament::calculateMutualResult` returned NULL if result was invalid
* BUGFIX: `Tournament::calculateBaumbach` treated bye as won
## v1.1.2 (Release: 21-jun-2019)
* ENHANCEMENT: Added update section to dist/readme.md

View File

@ -542,8 +542,10 @@ class Tournament
{
$totalwins = 0;
foreach ($player->getPairings() as $pairing) {
if (array_search($pairing->getResult(), Constants::Won) !== false) {
$totalwins++;
if (array_search($pairing->getResult(), Constants::NotPlayed) === false) {
if (array_search($pairing->getResult(), Constants::Won) !== false) {
$totalwins++;
}
}
}
return $totalwins;