private function setColor($color)
    {
        if (!isset(self::$colors[$color])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid foreground color specified: "%s". Expected one of (%s)',
                $color,
                implode(', ', array_keys(self::$colors))
            ));
        }

        $this->color = self::$colors[$color];
    }
private function setColor($color)
    {
        if (!isset(self::$colors[$color])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid foreground color specified: "%s". Expected one of (%s)',
                $color,
                implode(', ', array_keys(self::$colors))
            ));
        }

        $this->color = self::$colors[$color];
    }
private function setColor ( $ color ) { if ( ! isset ( self :: $ colors [ $ color ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid foreground color specified: "%s". Expected one of (%s)' , $ color , implode ( ', ' , array_keys ( self :: $ colors ) ) ) ) ; } $ this -> color = self :: $ colors [ $ color ] ; }
Sets the team color.

@param string $color The team color.

@throws \InvalidArgumentException When an invalid color is provided.
Sets the team color .