public function getRoundTitles()
    {
        $semiFinalTitles = ['Semi-Finals', 'Final'];
        $quarterFinalTitles = ['Quarter-Finals', 'Semi-Finals', 'Final'];
        $roundTitle = [
            2 => ['Final'],
            3 => $semiFinalTitles,
            4 => $semiFinalTitles,
            5 => $semiFinalTitles,
            6 => $quarterFinalTitles,
            7 => $quarterFinalTitles,
            8 => $quarterFinalTitles,

        ];
        if ($this->numFighters > 8) {
            $roundTitles = ['Quarter-Finals', 'Semi-Finals', 'Final'];
            $noRounds = ceil(log($this->numFighters, 2));
            $noTeamsInFirstRound = pow(2, ceil(log($this->numFighters) / log(2)));
            $tempRounds = [];

            //The minus 3 is to ignore the final, semi final and quarter final rounds

            for ($i = 0; $i < $noRounds - 3; $i++) {
                $tempRounds[] = 'Last ' . $noTeamsInFirstRound;
                $noTeamsInFirstRound /= 2;
            }

            return array_merge($tempRounds, $roundTitles);
        }

        return $roundTitle[$this->numFighters];
    }
public function getRoundTitles()
    {
        $semiFinalTitles = ['Semi-Finals', 'Final'];
        $quarterFinalTitles = ['Quarter-Finals', 'Semi-Finals', 'Final'];
        $roundTitle = [
            2 => ['Final'],
            3 => $semiFinalTitles,
            4 => $semiFinalTitles,
            5 => $semiFinalTitles,
            6 => $quarterFinalTitles,
            7 => $quarterFinalTitles,
            8 => $quarterFinalTitles,

        ];
        if ($this->numFighters > 8) {
            $roundTitles = ['Quarter-Finals', 'Semi-Finals', 'Final'];
            $noRounds = ceil(log($this->numFighters, 2));
            $noTeamsInFirstRound = pow(2, ceil(log($this->numFighters) / log(2)));
            $tempRounds = [];

            //The minus 3 is to ignore the final, semi final and quarter final rounds

            for ($i = 0; $i < $noRounds - 3; $i++) {
                $tempRounds[] = 'Last ' . $noTeamsInFirstRound;
                $noTeamsInFirstRound /= 2;
            }

            return array_merge($tempRounds, $roundTitles);
        }

        return $roundTitle[$this->numFighters];
    }
public function getRoundTitles ( ) { $ semiFinalTitles = [ 'Semi-Finals' , 'Final' ] ; $ quarterFinalTitles = [ 'Quarter-Finals' , 'Semi-Finals' , 'Final' ] ; $ roundTitle = [ 2 => [ 'Final' ] , 3 => $ semiFinalTitles , 4 => $ semiFinalTitles , 5 => $ semiFinalTitles , 6 => $ quarterFinalTitles , 7 => $ quarterFinalTitles , 8 => $ quarterFinalTitles , ] ; if ( $ this -> numFighters > 8 ) { $ roundTitles = [ 'Quarter-Finals' , 'Semi-Finals' , 'Final' ] ; $ noRounds = ceil ( log ( $ this -> numFighters , 2 ) ) ; $ noTeamsInFirstRound = pow ( 2 , ceil ( log ( $ this -> numFighters ) / log ( 2 ) ) ) ; $ tempRounds = [ ] ; //The minus 3 is to ignore the final, semi final and quarter final rounds for ( $ i = 0 ; $ i < $ noRounds - 3 ; $ i ++ ) { $ tempRounds [ ] = 'Last ' . $ noTeamsInFirstRound ; $ noTeamsInFirstRound /= 2 ; } return array_merge ( $ tempRounds , $ roundTitles ) ; } return $ roundTitle [ $ this -> numFighters ] ; }
returns titles depending of number of rounds.

@return array
returns titles depending of number of rounds .