Updated some more phpdoc

This commit is contained in:
Jeroen De Meerleer 2019-02-11 17:54:50 +01:00
parent d745c04b54
commit 4474d29ad3
3 changed files with 20 additions and 16 deletions

View File

@ -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
{

View File

@ -27,6 +27,7 @@
namespace JeroenED\Libpairtwo\Models;
use JeroenED\Libpairtwo\Enums\TournamentSystem;
use JeroenED\LibPairtwo\Player;
use DateTime;
/**

View File

@ -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();
}