Updated docs

This commit is contained in:
Jeroen De Meerleer 2019-06-20 14:53:26 +02:00
parent 50a97ad572
commit db989487a1
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
7 changed files with 264 additions and 47 deletions

View File

@ -42,8 +42,11 @@ abstract class IOFactory
/** /**
* Creates a reader for $type * Creates a reader for $type
* *
* Compatible types are Pairtwo-5 and Pairtwo-6
*
* @param string $type * @param string $type
* @return ReaderInterface * @return ReaderInterface
* @throws LibpairtwoException
*/ */
public static function createReader(string $type): ReaderInterface public static function createReader(string $type): ReaderInterface
{ {

View File

@ -43,6 +43,8 @@ class Pairing
private $Round; private $Round;
/** /**
* Returns the player of the pairing
*
* @return Player | null * @return Player | null
*/ */
public function getPlayer(): ?Player public function getPlayer(): ?Player
@ -51,6 +53,8 @@ class Pairing
} }
/** /**
* Sets the player of the pairing
*
* @param Player | null $Player * @param Player | null $Player
* @return Pairing * @return Pairing
*/ */
@ -61,6 +65,8 @@ class Pairing
} }
/** /**
* Returns the opponent of the pairing
*
* @return Player | null * @return Player | null
*/ */
public function getOpponent(): ?Player public function getOpponent(): ?Player
@ -69,6 +75,8 @@ class Pairing
} }
/** /**
* Sets the opponent of the pairing
*
* @param Player | null $Opponent * @param Player | null $Opponent
* @return Pairing * @return Pairing
*/ */
@ -79,6 +87,8 @@ class Pairing
} }
/** /**
* Returns the color of the pairing
*
* @return Color * @return Color
*/ */
public function getColor(): Color public function getColor(): Color
@ -87,6 +97,8 @@ class Pairing
} }
/** /**
* Sets the color of the pairing
*
* @param Color $Color * @param Color $Color
* @return Pairing * @return Pairing
*/ */
@ -97,6 +109,8 @@ class Pairing
} }
/** /**
* Returns the individual result of the pairing
*
* @return Result * @return Result
*/ */
public function getResult(): Result public function getResult(): Result
@ -105,6 +119,8 @@ class Pairing
} }
/** /**
* Sets the individual result of the pairing
*
* @param Result $Result * @param Result $Result
* @return Pairing * @return Pairing
*/ */
@ -115,6 +131,8 @@ class Pairing
} }
/** /**
* Returns the round number of the pairing
*
* @return int * @return int
*/ */
public function getRound(): int public function getRound(): int
@ -123,6 +141,8 @@ class Pairing
} }
/** /**
* Sets the round number of the pairing
*
* @param int $Round * @param int $Round
* @return Pairing * @return Pairing
*/ */

View File

@ -101,6 +101,7 @@ class Player
} }
/** /**
* Returns the elo of elotype for the player
* @param string $type * @param string $type
* @return int * @return int
*/ */
@ -110,6 +111,8 @@ class Player
} }
/** /**
* Sets the elo of elotype for the player
*
* @param string $type * @param string $type
* @param int $value * @param int $value
* @return Player * @return Player
@ -123,6 +126,10 @@ class Player
} }
/** /**
* Returns the identifier of type for the player
*
* Common possible values are Fide or National
*
* @param string $type * @param string $type
* @return string * @return string
*/ */
@ -132,6 +139,10 @@ class Player
} }
/** /**
* Sets the identifier of type for the player
*
* Common possible values are Fide or National
*
* @param string $type * @param string $type
* @param string $value * @param string $value
* @return Player * @return Player
@ -145,6 +156,8 @@ class Player
} }
/** /**
* Returns the number of won matches for the player
*
* @return int * @return int
*/ */
public function getNoOfWins(): int public function getNoOfWins(): int
@ -159,6 +172,11 @@ class Player
} }
/** /**
* Returns the points of the player.
*
* 1 Point is awarded for winning
* 0.5 points are awarded for draw
*
* @return float * @return float
*/ */
public function getPoints(): float public function getPoints(): float
@ -176,6 +194,10 @@ class Player
/** /**
* Returns the performance rating of the player
*
* WARNING: Calculation currently incorrect. Uses the rule of 400 as temporary solution
*
* @return int * @return int
*/ */
public function getPerformance(string $type, int $unratedElo): float public function getPerformance(string $type, int $unratedElo): float
@ -201,6 +223,8 @@ class Player
/** /**
* Returns the number of played games of the player
*
* @return int * @return int
*/ */
public function getPlayedGames(): int public function getPlayedGames(): int
@ -215,6 +239,8 @@ class Player
} }
/** /**
* Returns the name of the player
*
* @return string * @return string
*/ */
public function getName(): string public function getName(): string
@ -223,8 +249,10 @@ class Player
} }
/** /**
* Sets the name of the player
*
* @param string $Name * @param string $Name
* @return \JeroenED\Libpairtwo\Models\Player * @return Player
*/ */
public function setName(string $Name): Player public function setName(string $Name): Player
{ {
@ -233,6 +261,8 @@ class Player
} }
/** /**
* Returns an array of all ID's of the player
*
* @return string[] * @return string[]
*/ */
public function getIds(): ?array public function getIds(): ?array
@ -241,6 +271,8 @@ class Player
} }
/** /**
* Sets an array of all ID's of the player
*
* @param string[] $Ids * @param string[] $Ids
* @return Player * @return Player
*/ */
@ -251,6 +283,8 @@ class Player
} }
/** /**
* Returns an array of all elos of the player
*
* @return int[] * @return int[]
*/ */
public function getElos(): ?array public function getElos(): ?array
@ -259,6 +293,8 @@ class Player
} }
/** /**
* Sets an array of all elos of the player
*
* @param int[] $Elos * @param int[] $Elos
* @return Player * @return Player
*/ */
@ -269,24 +305,30 @@ class Player
} }
/** /**
* @return \DateTime * Returns the date of birth of the player
*
* @return DateTime
*/ */
public function getDateOfBirth(): \DateTime public function getDateOfBirth(): DateTime
{ {
return $this->DateOfBirth; return $this->DateOfBirth;
} }
/** /**
* @param \DateTime $DateOfBirth * Sets the date of birth of the player
*
* @param DateTime $DateOfBirth
* @return Player * @return Player
*/ */
public function setDateOfBirth(\DateTime $DateOfBirth): Player public function setDateOfBirth(DateTime $DateOfBirth): Player
{ {
$this->DateOfBirth = $DateOfBirth; $this->DateOfBirth = $DateOfBirth;
return $this; return $this;
} }
/** /**
* Returns an array of all tiebreaks for the player
*
* @return float[] * @return float[]
*/ */
public function getTiebreaks(): array public function getTiebreaks(): array
@ -295,6 +337,8 @@ class Player
} }
/** /**
* Sets an array of all tiebreaks for the player
*
* @param float[] $Tiebreaks * @param float[] $Tiebreaks
* @return Player * @return Player
*/ */
@ -305,6 +349,7 @@ class Player
} }
/** /**
* Returns the nation of the player
* example value: BEL * example value: BEL
* *
* @return string * @return string
@ -315,6 +360,7 @@ class Player
} }
/** /**
* Sets the nation of the player
* example value: BEL * example value: BEL
* *
* @param string $Nation * @param string $Nation
@ -327,6 +373,8 @@ class Player
} }
/** /**
* Returns the category of the player
*
* @return string * @return string
*/ */
public function getCategory(): string public function getCategory(): string
@ -335,6 +383,8 @@ class Player
} }
/** /**
* Sets the category of the player
*
* @param string $Category * @param string $Category
* @return Player * @return Player
*/ */
@ -345,6 +395,8 @@ class Player
} }
/** /**
* Returns the title of the player
*
* @return Title * @return Title
*/ */
public function getTitle(): Title public function getTitle(): Title
@ -353,6 +405,8 @@ class Player
} }
/** /**
* Sets the title of the player
*
* @param Title $Title * @param Title $Title
* @return Player * @return Player
*/ */
@ -363,6 +417,8 @@ class Player
} }
/** /**
* Returns the gender of the player
*
* @return Gender * @return Gender
*/ */
public function getGender(): Gender public function getGender(): Gender
@ -371,6 +427,8 @@ class Player
} }
/** /**
* Sets the gender of the player
*
* @param Gender $Gender * @param Gender $Gender
* @return Player * @return Player
*/ */
@ -381,6 +439,8 @@ class Player
} }
/** /**
* Returns an array of all pairings of the player
*
* @return Pairing[] * @return Pairing[]
*/ */
public function getPairings(): array public function getPairings(): array
@ -389,6 +449,8 @@ class Player
} }
/** /**
* Sets an array of all pairings of the player
*
* @param Pairing[] $Pairings * @param Pairing[] $Pairings
* @return Player * @return Player
*/ */
@ -399,6 +461,8 @@ class Player
} }
/** /**
* Returns binary data that was read out the pairtwo file but was not needed immediately
*
* @param string $Key * @param string $Key
* @return bool|DateTime|int|string * @return bool|DateTime|int|string
*/ */
@ -408,6 +472,8 @@ class Player
} }
/** /**
* Sets binary data that is read out the pairtwo file but is not needed immediately
*
* @param string $Key * @param string $Key
* @param bool|int|DateTime|string $Value * @param bool|int|DateTime|string $Value
* @return Player * @return Player

View File

@ -55,6 +55,8 @@ class Pairtwo6 implements ReaderInterface
private $BinaryData; private $BinaryData;
/** /**
* Returns the version tag of Pairtwo which created the pairtwo file
*
* @return string * @return string
*/ */
public function getRelease(): string public function getRelease(): string
@ -63,8 +65,10 @@ class Pairtwo6 implements ReaderInterface
} }
/** /**
* Sets the version tag of Pairtwo which created the pairtwo file
*
* @param string $Release * @param string $Release
* @return \JeroenED\Libpairtwo\Readers\Models\Pairtwo6 * @return Pairtwo6
*/ */
public function setRelease(string $Release): Pairtwo6 public function setRelease(string $Release): Pairtwo6
{ {
@ -73,6 +77,8 @@ class Pairtwo6 implements ReaderInterface
} }
/** /**
* Returns the tournament that was read out of the pairtwo file
*
* @return Tournament * @return Tournament
*/ */
public function getTournament(): Tournament public function getTournament(): Tournament
@ -81,6 +87,8 @@ class Pairtwo6 implements ReaderInterface
} }
/** /**
* Sets the tournament that was read out of the pairtwo file
*
* @param Tournament $Tournament * @param Tournament $Tournament
* @return Pairtwo6 * @return Pairtwo6
*/ */
@ -92,6 +100,8 @@ class Pairtwo6 implements ReaderInterface
/** /**
* Returns binary data that was read out the pairtwo file but was not needed immediately
*
* @param string $Key * @param string $Key
* @return bool|DateTime|int|string * @return bool|DateTime|int|string
*/ */
@ -102,6 +112,8 @@ class Pairtwo6 implements ReaderInterface
/** /**
* Sets binary data that is read out the pairtwo file but is not needed immediately
*
* @param string $Key * @param string $Key
* @param bool|int|DateTime|string $Value * @param bool|int|DateTime|string $Value
* @return Pairtwo6 * @return Pairtwo6
@ -119,7 +131,7 @@ class Pairtwo6 implements ReaderInterface
* @return Pairtwo6 * @return Pairtwo6
* @throws IncompatibleReaderException * @throws IncompatibleReaderException
*/ */
public function read($filename): ReaderInterface public function read(string $filename): ReaderInterface
{ {
$swshandle = fopen($filename, 'rb'); $swshandle = fopen($filename, 'rb');
$swscontents = fread($swshandle, filesize($filename)); $swscontents = fread($swshandle, filesize($filename));

View File

@ -142,7 +142,7 @@ class Round
return $this; return $this;
} }
/** /**
* Returns an array of all games in the tournament * Returns an array of all games for the round
* *
* @return Game[] * @return Game[]
*/ */
@ -151,7 +151,7 @@ class Round
return $this->games; return $this->games;
} }
/** /**
* Sets Round::games to $games * Sets an array of all games for the round
* *
* @param Game[] $games * @param Game[] $games
* @return Round * @return Round
@ -162,7 +162,7 @@ class Round
return $this; return $this;
} }
/** /**
* Returns the round number * Returns the round number of the round
* *
* @return int * @return int
*/ */
@ -171,7 +171,7 @@ class Round
return $this->roundNo; return $this->roundNo;
} }
/** /**
* Sets the round number * Sets the round number of the round
* *
* @param int $roundNo * @param int $roundNo
* @return Round * @return Round
@ -182,7 +182,7 @@ class Round
return $this; return $this;
} }
/** /**
* Returns an array of all pairings for this round * Returns an array of all pairings for the round
* *
* @return Pairing[] * @return Pairing[]
*/ */
@ -191,7 +191,7 @@ class Round
return $this->pairings; return $this->pairings;
} }
/** /**
* Sets Round::Pairings to $pairings * Sets an array of all pairings for the round
* *
* @param Pairing[] $pairings * @param Pairing[] $pairings
* @return Round * @return Round

View File

@ -12,6 +12,7 @@
namespace JeroenED\Libpairtwo; namespace JeroenED\Libpairtwo;
use Closure;
use DateTime; use DateTime;
use JeroenED\Libpairtwo\Enums\Tiebreak; use JeroenED\Libpairtwo\Enums\Tiebreak;
use JeroenED\Libpairtwo\Enums\Color; use JeroenED\Libpairtwo\Enums\Color;
@ -288,8 +289,9 @@ class Tournament
* *
* @param Game $game * @param Game $game
* @param int $round * @param int $round
* @return Tournament
*/ */
public function addGame(Game $game, int $round) public function addGame(Game $game, int $round): Tournament
{ {
if (!isset($this->getRounds()[$round])) { if (!isset($this->getRounds()[$round])) {
$roundObj = new Round(); $roundObj = new Round();
@ -298,6 +300,7 @@ class Tournament
} }
$this->getRoundByNo($round)->addGame($game); $this->getRoundByNo($round)->addGame($game);
return $this;
} }
/** /**
@ -305,7 +308,7 @@ class Tournament
* *
* @return Player[] * @return Player[]
*/ */
public function getRanking() public function getRanking(): array
{ {
$players = $this->getPlayers(); $players = $this->getPlayers();
foreach ($this->getTiebreaks() as $tbkey=>$tiebreak) { foreach ($this->getTiebreaks() as $tbkey=>$tiebreak) {
@ -350,10 +353,10 @@ class Tournament
/** /**
* @param Player $a * @param Player $a
* @param Player $b * @param Player $b
* @return \Closure * @return Closure
*/ */
private function sortTiebreak(int $key) private function sortTiebreak(int $key): Closure
{ {
return function (Player $a, Player $b) use ($key) { return function (Player $a, Player $b) use ($key) {
if (($b->getTiebreaks()[$key] == $a->getTiebreaks()[$key]) || ($a->getTiebreaks()[$key] === false) || ($b->getTiebreaks()[$key] === false)) { if (($b->getTiebreaks()[$key] == $a->getTiebreaks()[$key]) || ($a->getTiebreaks()[$key] === false) || ($b->getTiebreaks()[$key] === false)) {
@ -541,6 +544,8 @@ class Tournament
/** /**
* Result between the tied players
*
* @param Player $player * @param Player $player
* @param array $opponents * @param array $opponents
* @param int $key * @param int $key
@ -581,6 +586,8 @@ class Tournament
/** /**
* The average rating of the opponents
*
* @param Player $player * @param Player $player
* @param int $cut * @param int $cut
* @return float * @return float
@ -604,6 +611,8 @@ class Tournament
/** /**
* The average performance of the opponents
*
* @param Player $player * @param Player $player
* @param int $cut * @param int $cut
* @return float | null * @return float | null
@ -627,6 +636,8 @@ class Tournament
/** /**
* Points against players who have more than $cut % points
*
* @param Player $player * @param Player $player
* @param int $cut * @param int $cut
* @return float | null * @return float | null
@ -648,6 +659,7 @@ class Tournament
/** /**
* The combined points of the opponents
* @param Player $player * @param Player $player
* @param int $cutlowest * @param int $cutlowest
* @param int $cuthighest * @param int $cuthighest
@ -685,6 +697,8 @@ class Tournament
/** /**
* The points of $player's opponents who $player won against, plus half of the points of $player's opponents who $player drew against
*
* @param Player $player * @param Player $player
* @return float | null * @return float | null
*/ */
@ -705,6 +719,8 @@ class Tournament
/** /**
* 3 points for each, 1 for each draw and no for losing. -1 for not played games
*
* @param Player $player * @param Player $player
* @return float | null * @return float | null
*/ */
@ -730,6 +746,8 @@ class Tournament
} }
/** /**
* 4 points for each, 2 for each draw and 1 point for losing. 0 points for not played games
*
* @param Player $player * @param Player $player
* @return float | null * @return float | null
*/ */
@ -755,6 +773,8 @@ class Tournament
} }
/** /**
* Combined score of $player after each round
*
* @param Player $player * @param Player $player
* @return float | null * @return float | null
*/ */
@ -776,6 +796,8 @@ class Tournament
} }
/** /**
* Returns the name of the tournament
*
* @return string * @return string
*/ */
public function getName(): string public function getName(): string
@ -784,8 +806,10 @@ class Tournament
} }
/** /**
* Sets the name of the tournament
*
* @param string $Name * @param string $Name
* @return \JeroenED\Libpairtwo\Models\Tournament * @return Tournament
*/ */
public function setName(string $Name): Tournament public function setName(string $Name): Tournament
{ {
@ -794,6 +818,8 @@ class Tournament
} }
/** /**
* Returns the organiser of the tournament
*
* @return string * @return string
*/ */
public function getOrganiser(): string public function getOrganiser(): string
@ -802,6 +828,8 @@ class Tournament
} }
/** /**
* Sets the organiser of the tournament
*
* @param string $Organiser * @param string $Organiser
* @return Tournament * @return Tournament
*/ */
@ -812,6 +840,8 @@ class Tournament
} }
/** /**
* Returns the clubidentifier of the tournament
*
* @return int * @return int
*/ */
public function getOrganiserClubNo(): int public function getOrganiserClubNo(): int
@ -820,6 +850,8 @@ class Tournament
} }
/** /**
* Sets the clubidentifier of the tournament
*
* @param int $OrganiserClubNo * @param int $OrganiserClubNo
* @return Tournament * @return Tournament
*/ */
@ -830,6 +862,8 @@ class Tournament
} }
/** /**
* Returns the club of the organiser
*
* @return string * @return string
*/ */
public function getOrganiserClub(): string public function getOrganiserClub(): string
@ -838,6 +872,8 @@ class Tournament
} }
/** /**
* Sets the club of the organiser
*
* @param string $OrganiserClub * @param string $OrganiserClub
* @return Tournament * @return Tournament
*/ */
@ -848,6 +884,8 @@ class Tournament
} }
/** /**
* Returns the location of the tournament
*
* @return string * @return string
*/ */
public function getOrganiserPlace(): string public function getOrganiserPlace(): string
@ -856,6 +894,8 @@ class Tournament
} }
/** /**
* Sets the location of the tournament
*
* @param string $OrganiserPlace * @param string $OrganiserPlace
* @return Tournament * @return Tournament
*/ */
@ -866,6 +906,8 @@ class Tournament
} }
/** /**
* Returns the country where the tournament is held
*
* @return string * @return string
*/ */
public function getOrganiserCountry(): string public function getOrganiserCountry(): string
@ -874,6 +916,8 @@ class Tournament
} }
/** /**
* Sets the country where the tournament is held
*
* @param string $OrganiserCountry * @param string $OrganiserCountry
* @return Tournament * @return Tournament
*/ */
@ -884,6 +928,8 @@ class Tournament
} }
/** /**
* Returns the fide homologation
*
* @return int * @return int
*/ */
public function getFideHomol(): int public function getFideHomol(): int
@ -892,6 +938,8 @@ class Tournament
} }
/** /**
* Sets the fide homologation
*
* @param int $FideHomol * @param int $FideHomol
* @return Tournament * @return Tournament
*/ */
@ -902,6 +950,8 @@ class Tournament
} }
/** /**
* Returns the start date of the tournament
*
* @return DateTime * @return DateTime
*/ */
public function getStartDate(): DateTime public function getStartDate(): DateTime
@ -910,6 +960,8 @@ class Tournament
} }
/** /**
* Sets the start date of the tournament
*
* @param DateTime $StartDate * @param DateTime $StartDate
* @return Tournament * @return Tournament
*/ */
@ -920,6 +972,8 @@ class Tournament
} }
/** /**
* Returns the end date of the tournament
*
* @return DateTime * @return DateTime
*/ */
public function getEndDate(): DateTime public function getEndDate(): DateTime
@ -928,6 +982,8 @@ class Tournament
} }
/** /**
* Sets the end date of the tournament
*
* @param DateTime $EndDate * @param DateTime $EndDate
* @return Tournament * @return Tournament
*/ */
@ -938,6 +994,8 @@ class Tournament
} }
/** /**
* Returns the arbiter of the tournament
*
* @return string * @return string
*/ */
public function getArbiter(): string public function getArbiter(): string
@ -946,6 +1004,8 @@ class Tournament
} }
/** /**
* Sets the arbiter of the tournament
*
* @param string $Arbiter * @param string $Arbiter
* @return Tournament * @return Tournament
*/ */
@ -956,6 +1016,8 @@ class Tournament
} }
/** /**
* Returns the number of round
*
* @return int * @return int
*/ */
public function getNoOfRounds(): int public function getNoOfRounds(): int
@ -964,6 +1026,8 @@ class Tournament
} }
/** /**
* Sets the number of rounds
*
* @param int $NoOfRounds * @param int $NoOfRounds
* @return Tournament * @return Tournament
*/ */
@ -974,6 +1038,8 @@ class Tournament
} }
/** /**
* Returns an array containing all rounds of the tournament
*
* @return Round[] * @return Round[]
*/ */
public function getRounds(): array public function getRounds(): array
@ -982,6 +1048,8 @@ class Tournament
} }
/** /**
* Sets an array containing all rounds of the tournament
*
* @param Round[] $Rounds * @param Round[] $Rounds
* @return Tournament * @return Tournament
*/ */
@ -992,6 +1060,8 @@ class Tournament
} }
/** /**
* Returns the tempo of the tournament
*
* @return string * @return string
*/ */
public function getTempo(): string public function getTempo(): string
@ -1000,6 +1070,8 @@ class Tournament
} }
/** /**
* Sets the tempo of the tournament
*
* @param string $Tempo * @param string $Tempo
* @return Tournament * @return Tournament
*/ */
@ -1010,6 +1082,8 @@ class Tournament
} }
/** /**
* Returns the elo of a player if the player does not have one
*
* @return int * @return int
*/ */
public function getNonRatedElo(): int public function getNonRatedElo(): int
@ -1018,6 +1092,8 @@ class Tournament
} }
/** /**
* Sets the elo of a player if the player does not have one
*
* @param int $NonRatedElo * @param int $NonRatedElo
* @return Tournament * @return Tournament
*/ */
@ -1028,6 +1104,8 @@ class Tournament
} }
/** /**
* Returns the tournament system
*
* @return TournamentSystem * @return TournamentSystem
*/ */
public function getSystem(): TournamentSystem public function getSystem(): TournamentSystem
@ -1036,6 +1114,8 @@ class Tournament
} }
/** /**
* Sets the tournament system
*
* @param TournamentSystem $System * @param TournamentSystem $System
* @return Tournament * @return Tournament
*/ */
@ -1046,6 +1126,8 @@ class Tournament
} }
/** /**
* Returns the first period of the tempo
*
* @return string * @return string
*/ */
public function getFirstPeriod(): string public function getFirstPeriod(): string
@ -1054,6 +1136,8 @@ class Tournament
} }
/** /**
* Sets the first period of the tempo
*
* @param string $FirstPeriod * @param string $FirstPeriod
* @return Tournament * @return Tournament
*/ */
@ -1064,6 +1148,8 @@ class Tournament
} }
/** /**
* Returns the second period of the tempo
*
* @return string * @return string
*/ */
public function getSecondPeriod(): string public function getSecondPeriod(): string
@ -1072,6 +1158,8 @@ class Tournament
} }
/** /**
* Sets the second period of the tempo
*
* @param string $SecondPeriod * @param string $SecondPeriod
* @return Tournament * @return Tournament
*/ */
@ -1082,6 +1170,8 @@ class Tournament
} }
/** /**
* Returns the federation the tournament belongs to
*
* @return string * @return string
*/ */
public function getFederation(): string public function getFederation(): string
@ -1090,6 +1180,8 @@ class Tournament
} }
/** /**
* Sets the federation the tournament belongs to
*
* @param string $Federation * @param string $Federation
* @return Tournament * @return Tournament
*/ */
@ -1100,6 +1192,8 @@ class Tournament
} }
/** /**
* Returns an array of all players of the tournament
*
* @return Player[] * @return Player[]
*/ */
public function getPlayers(): array public function getPlayers(): array
@ -1108,6 +1202,8 @@ class Tournament
} }
/** /**
* Sets an array of all players of the tournament
*
* @param Player[] $Players * @param Player[] $Players
* @return Tournament * @return Tournament
*/ */
@ -1118,6 +1214,8 @@ class Tournament
} }
/** /**
* Returns the year the tournament is held in
*
* @return int * @return int
*/ */
public function getYear(): int public function getYear(): int
@ -1126,6 +1224,8 @@ class Tournament
} }
/** /**
* Sets the year the tournament is held in
*
* @param int $Year * @param int $Year
* @return Tournament * @return Tournament
*/ */
@ -1136,6 +1236,8 @@ class Tournament
} }
/** /**
* Returns an array of all pairings of the tournament
*
* @return Pairing[] * @return Pairing[]
*/ */
public function getPairings(): array public function getPairings(): array
@ -1144,6 +1246,8 @@ class Tournament
} }
/** /**
* Sets an array of all pairings of the tournament
*
* @param Pairing[] $Pairings * @param Pairing[] $Pairings
* @return Tournament * @return Tournament
*/ */
@ -1154,6 +1258,8 @@ class Tournament
} }
/** /**
* Returns an array of all tiebreaks of the tournament
*
* @return Tiebreak[] * @return Tiebreak[]
*/ */
public function getTiebreaks(): array public function getTiebreaks(): array
@ -1162,6 +1268,8 @@ class Tournament
} }
/** /**
* Sets an array of all tiebreaks of the tournament
*
* @param Tiebreak[] $Tiebreaks * @param Tiebreak[] $Tiebreaks
* @return Tournament * @return Tournament
*/ */
@ -1172,6 +1280,8 @@ class Tournament
} }
/** /**
* Returns the elo that has priority
*
* @return string * @return string
*/ */
public function getPriorityElo(): string public function getPriorityElo(): string
@ -1180,6 +1290,8 @@ class Tournament
} }
/** /**
* Sets the elo that has priority
*
* @param string $PriorityElo * @param string $PriorityElo
* @return Tournament * @return Tournament
*/ */
@ -1189,6 +1301,8 @@ class Tournament
return $this; return $this;
} }
/** /**
* Returns the identifier that has priority
*
* @return string * @return string
*/ */
public function getPriorityId(): string public function getPriorityId(): string
@ -1197,6 +1311,8 @@ class Tournament
} }
/** /**
* Sets the identifier that has priority
*
* @param string $PriorityId * @param string $PriorityId
* @return Tournament * @return Tournament
*/ */