private function setTeams(array $teams)
    {
        if (empty($teams)) {
            throw new \InvalidArgumentException(
                'You must provide at least one team'
            );
        }

        foreach ($teams as $team) {
            if (!$team instanceof Team) {
                throw new \InvalidArgumentException(
                    'All teams must be an instance of NyanCat\\Team'
                );
            }

            $this->teams[$team->getName()] = $team;
        }
    }
private function setTeams(array $teams)
    {
        if (empty($teams)) {
            throw new \InvalidArgumentException(
                'You must provide at least one team'
            );
        }

        foreach ($teams as $team) {
            if (!$team instanceof Team) {
                throw new \InvalidArgumentException(
                    'All teams must be an instance of NyanCat\\Team'
                );
            }

            $this->teams[$team->getName()] = $team;
        }
    }
private function setTeams ( array $ teams ) { if ( empty ( $ teams ) ) { throw new \ InvalidArgumentException ( 'You must provide at least one team' ) ; } foreach ( $ teams as $ team ) { if ( ! $ team instanceof Team ) { throw new \ InvalidArgumentException ( 'All teams must be an instance of NyanCat\\Team' ) ; } $ this -> teams [ $ team -> getName ( ) ] = $ team ; } }
Sets the teams to track on the scoreboard.

@param array $teams the teams to track on the scoreboard.

@throws \InvalidArgumentException When invalid or no teams are provided.
Sets the teams to track on the scoreboard .