More type stuff and unused code removed.

This commit is contained in:
2023-08-01 12:56:37 +00:00
parent dc35035c3c
commit 7792552c9f
9 changed files with 20 additions and 44 deletions

View File

@ -4,34 +4,34 @@ namespace DNW\Skills;
class RatingContainer
{
private $_playerToRating;
private HashMap $_playerToRating;
public function __construct()
{
$this->_playerToRating = new HashMap();
}
public function getRating(Player $player)
public function getRating(Player $player): mixed
{
return $this->_playerToRating->getValue($player);
}
public function setRating(Player $player, Rating $rating)
public function setRating(Player $player, Rating $rating): HashMap
{
return $this->_playerToRating->setValue($player, $rating);
}
public function getAllPlayers()
public function getAllPlayers(): array
{
return $this->_playerToRating->getAllKeys();
}
public function getAllRatings()
public function getAllRatings(): array
{
return $this->_playerToRating->getAllValues();
}
public function count()
public function count(): int
{
return $this->_playerToRating->count();
}