classes/Report.php
/**
     * Detects sport type and updates Athlete score within result set
     * @param Athlete $athlete
     * @param string  $abbreviation
     * @param string  $value
     */
Detects sport type and updates Athlete score within result set
@param Athlete $athlete
@param string  $abbreviation
@param string  $value
Detects sport type and updates Athlete score within result set @param Athlete $athlete @param string $abbreviation @param string $value
private function addScoreForAthlete(Athlete $athlete, $abbreviation, $value) {
        switch ($this->type) {
            case IAAF::SPORT_TYPE_HEPTATHLON:
                $sport = new Heptathlon();
                $score = $sport->calculateScore($abbreviation, $value);
                break;
            default:
                throw new Exception("Error Processing Request. Unidentified type " . $this->type, 1);
                break;
        }
        $athlete->addScore($score);
    }
private function addScoreForAthlete ( Athlete $ athlete , $ abbreviation , $ value ) { switch ( $ this -> type ) { case IAAF :: SPORT_TYPE_HEPTATHLON : $ sport = new Heptathlon ( ) ; $ score = $ sport -> calculateScore ( $ abbreviation , $ value ) ; break ; default : throw new Exception ( " Error Processing Request. Unidentified type  " . $ this -> type , 1 ) ; break ; } $ athlete -> addScore ( $ score ) ; }
Detects sport type and updates Athlete score within result set
 @param Athlete $athlete
 @param string  $abbreviation
 @param string  $value
Detects sport type and updates Athlete score within result set @param Athlete $athlete @param string $abbreviation @param string $value