Reimplemented getParticipants

Possibly historic field that became unused
This commit is contained in:
Jeroen De Meerleer 2019-06-18 15:57:42 +02:00
parent fcd6766cfe
commit 1f3e381049
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
3 changed files with 10 additions and 22 deletions

View File

@ -74,9 +74,6 @@ abstract class Tournament
/** @var Round[] */
private $Rounds = [];
/** @var int */
private $Participants;
/** @var string */
private $Tempo;
@ -329,24 +326,6 @@ abstract class Tournament
return $this;
}
/**
* @return int
*/
public function getParticipants(): int
{
return $this->Participants;
}
/**
* @param int $Participants
* @return Tournament
*/
public function setParticipants(int $Participants): Tournament
{
$this->Participants = $Participants;
return $this;
}
/**
* @return string
*/

View File

@ -507,7 +507,7 @@ class Pairtwo6 extends Pairtwo6Model implements ReaderInterface
// Participants
$length = 4;
$this->getTournament()->setParticipants($this->readData('Int', substr($swscontents, $offset, $length)));
$this->getTournament()->setBinaryData('Participants', $this->readData('Int', substr($swscontents, $offset, $length)));
$offset += $length;
// Fidehomol

View File

@ -351,4 +351,13 @@ class Tournament extends Tiebreaks
}
return intdiv($totalrating, $players);
}
/**
* Returns the number of participants
*
* @return int
*/
public function getParticipants(): int {
return count($this->getPlayers());
}
}