| | |
| | | { |
| | | if (!in_array($color, $this->allowedColors)) |
| | | { |
| | | throw new \InvalidArgumentException("Given colour " . $team_color . " not allowed. Allowed colours: " . implode(', ', $this->allowedColors)); |
| | | throw new \InvalidArgumentException("Given colour " . $color . " not allowed. Allowed colours: " . implode(', ', $this->allowedColors)); |
| | | } |
| | | } |
| | | |
| | | public function setTeamName(string $team_color = self::TEAM_BLUE, $name) |
| | | public function setTeamName(string $team_color = self::TEAM_BLUE, $name= '') |
| | | { |
| | | $this->testColor($team_color); |
| | | $this->state['team'][$team_color]['name'] = $name; |
| | | } |
| | | |
| | | public function addTeamBan(string $team_color = self::TEAM_BLUE, $operator) |
| | | public function addTeamBan(string $team_color = self::TEAM_BLUE, $operator = '') |
| | | { |
| | | $this->testColor($team_color); |
| | | if (!in_array($operator, $this->allowedOperators)) |