diff --git a/src/Models/Round.php b/src/Models/Round.php index 984635a..5f3789e 100644 --- a/src/Models/Round.php +++ b/src/Models/Round.php @@ -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 { diff --git a/src/Models/Tournament.php b/src/Models/Tournament.php index 3652475..736f17f 100644 --- a/src/Models/Tournament.php +++ b/src/Models/Tournament.php @@ -27,6 +27,7 @@ namespace JeroenED\Libpairtwo\Models; use JeroenED\Libpairtwo\Enums\TournamentSystem; +use JeroenED\LibPairtwo\Player; use DateTime; /** diff --git a/src/Tournament.php b/src/Tournament.php index ba3674f..eb56808 100644 --- a/src/Tournament.php +++ b/src/Tournament.php @@ -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(); }