mirror of
https://github.com/JeroenED/libpairtwo.git
synced 2024-11-21 22:17:41 +01:00
Updated some more phpdoc
This commit is contained in:
parent
8c6e3b81fa
commit
99ccb56aeb
@ -8,13 +8,15 @@
|
||||
|
||||
namespace JeroenED\Libpairtwo\Models;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class Round
|
||||
{
|
||||
private $date;
|
||||
private $games;
|
||||
|
||||
/**
|
||||
* @return \DateTime
|
||||
* @return DateTime
|
||||
*
|
||||
*/
|
||||
public function getDate()
|
||||
@ -23,7 +25,7 @@ class Round
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \DateTime $date
|
||||
* @param DateTime $date
|
||||
*/
|
||||
public function setDate($date): void
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
namespace JeroenED\Libpairtwo\Models;
|
||||
|
||||
use JeroenED\Libpairtwo\Enums\TournamentSystem;
|
||||
use JeroenED\LibPairtwo\Player;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
|
@ -9,15 +9,15 @@
|
||||
namespace JeroenED\Libpairtwo;
|
||||
|
||||
use JeroenED\Libpairtwo\Models\Tournament as TournamentModel;
|
||||
use phpDocumentor\Reflection\Types\Boolean;
|
||||
use JeroenED\LibPairtwo\Player;
|
||||
|
||||
class Tournament extends TournamentModel
|
||||
{
|
||||
/**
|
||||
* @param Integer $id
|
||||
* @param integer $id
|
||||
* @return Player
|
||||
*/
|
||||
public function getPlayerById($id)
|
||||
public function getPlayerById(int $id)
|
||||
{
|
||||
return $this->GetPlayers()[$id];
|
||||
}
|
||||
@ -33,10 +33,10 @@ class Tournament extends TournamentModel
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @param int $id
|
||||
* @param Player $player
|
||||
*/
|
||||
public function updatePlayer($id, Player $player)
|
||||
public function updatePlayer(int $id, Player $player)
|
||||
{
|
||||
$newArray = $this->GetPlayers();
|
||||
$newArray[$id] = $player;
|
||||
@ -64,7 +64,8 @@ class Tournament extends TournamentModel
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @param bool $americansort
|
||||
* @return Player[]
|
||||
*/
|
||||
public function getRanking(bool $americansort = false)
|
||||
{
|
||||
@ -76,21 +77,21 @@ class Tournament extends TournamentModel
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $a
|
||||
* @param $b
|
||||
* @return mixed
|
||||
* @param Player $a
|
||||
* @param Player $b
|
||||
* @return int
|
||||
*/
|
||||
private function sortNormal($a, $b)
|
||||
private function sortNormal(Player $a, Player $b)
|
||||
{
|
||||
return $b->getPoints() - $a->getPoints();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $a
|
||||
* @param $b
|
||||
* @return mixed
|
||||
* @param Player $a
|
||||
* @param Player $b
|
||||
* @return int
|
||||
*/
|
||||
private function sortAmerican($a, $b)
|
||||
private function sortAmerican(Player $a, Player $b)
|
||||
{
|
||||
return $b->getScoreAmerican() - $a->getScoreAmerican();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user