mirror of
https://github.com/furyfire/trueskill.git
synced 2025-07-15 07:50:58 +02:00
rector: instanceOf, earlyReturn, strictBooleans
This commit is contained in:
@@ -9,10 +9,13 @@ class Team extends RatingContainer
|
||||
public function __construct(Player $player = NULL, Rating $rating = NULL)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if ($player && $rating) {
|
||||
$this->addPlayer($player, $rating);
|
||||
if (!$player instanceof \DNW\Skills\Player) {
|
||||
return;
|
||||
}
|
||||
if (!$rating instanceof \DNW\Skills\Rating) {
|
||||
return;
|
||||
}
|
||||
$this->addPlayer($player, $rating);
|
||||
}
|
||||
|
||||
public function addPlayer(Player $player, Rating $rating): self
|
||||
|
Reference in New Issue
Block a user