src/Model/Team.php
public function addPlayer(Player $player)
    {
        $this->players[] = $player;
        if ($this->index == -1) {
            $this->index = $player->team;
        }
    }
public function addPlayer(Player $player)
    {
        $this->players[] = $player;
        if ($this->index == -1) {
            $this->index = $player->team;
        }
    }
public function addPlayer ( Player $ player ) { $ this -> players [ ] = $ player ; if ( $ this -> index == - 1 ) { $ this -> index = $ player -> team ; } }
Adds a player to the team.

@param  \RecAnalyst\Model\Player  $player  The player we wish to add
@return void
Adds a player to the team .