/** * Displays report or generates its files * * @param VcsStats_Report $report Report * @return void */ public function render(VcsStats_Report $report) { VcsStats_Runner_Cli::displayMessage('Rendering report to text'); foreach ($report->getSections() as $section) { foreach ($section->getElements() as $element) { switch (get_class($element)) { case 'VcsStats_Report_Element_Table': $this->renderTable($element); break; } } } }
/** * Generates and returns report * * @param int $startRevision First revision to work on * @param int $endRevision Last revision to work on * @return VcsStats_Report Report */ public function getReport($startRevision, $endRevision) { $report = new VcsStats_Report(); $summarySection = new VcsStats_Report_Section(); $report->addSection($summarySection); $summarySection->addElement($this->_computeRevisionsCountByAuthor($startRevision, $endRevision)); return $report; }
public function testSetVcs() { $report = new VcsStats_Report(); $this->assertSame('', $report->getVcs()); $report->setVcs('Subversion'); $this->assertSame('Subversion', $report->getVcs()); }