classes/Report.php
/**
     * Second main function
     * Outputs HTML table if there are results
     * Otherwise prints out default message.
     * @return [type] [description]
     */
Second main function
Outputs HTML table if there are results
Otherwise prints out default message.
@return [type] [description]
Second main function Outputs HTML table if there are results Otherwise prints out default message . @return [ type ] [ description ]
public function output() {
        if (empty($this->results)) {
            die('No results.');
        }
        $day = 1;
        foreach ($this->results as $date => $results) {
            $title = 'Day ' . $day . ': ' . $date;
            Helper::printLn($title);
            uasort($results, array($this, 'sort'));
            foreach ($results as $key => $value) {
                $name = $value->getName();
                $score = $value->getScore();
                $spaceCount = 20 - strlen($score);
                $athlete = str_pad($name, $spaceCount, ' ');
                $output = strtoupper($athlete) . $score;
                Helper::printLn($output);
            }
            Helper::printLn();
            $day += 1;
        }
    }
public function output ( ) { if ( empty ( $ this -> results ) ) { die ( 'No results.' ) ; } $ day = 1 ; foreach ( $ this -> results as $ date => $ results ) { $ title = 'Day ' . $ day . ': ' . $ date ; Helper :: printLn ( $ title ) ; uasort ( $ results , array ( $ this , 'sort' ) ) ; foreach ( $ results as $ key => $ value ) { $ name = $ value -> getName ( ) ; $ score = $ value -> getScore ( ) ; $ spaceCount = 20 - strlen ( $ score ) ; $ athlete = str_pad ( $ name , $ spaceCount , ' ' ) ; $ output = strtoupper ( $ athlete ) . $ score ; Helper :: printLn ( $ output ) ; } Helper :: printLn ( ) ; $ day += 1 ; } }
Second main function
 Outputs HTML table if there are results
 Otherwise prints out default message.
Second main function Outputs HTML table if there are results Otherwise prints out default message .
// print('<table><tbody>'); // Helper::printLn('<th>' . $title . '</th>'); // Helper::printLn('<td>' . $scorer . '</td>'); // print('</tbody></table>');