public function update(\SplSubject $subject, $reporterEvent = null) { switch ($reporterEvent->event) { case 'exit': return; case 'termination': $temporaryReporterEvent = clone $reporterEvent; $temporaryReporterEvent->event = 'exit'; $this->formatter->update($subject, $temporaryReporterEvent); break; default: $this->formatter->update($subject, $reporterEvent); break; } }
public function update(\SplSubject $method, $reporterEvent = null) { if ($reporterEvent->event == 'exampleStart') { $this->startRenderingExample($reporterEvent); } elseif ($reporterEvent->event == 'exampleFinish') { $this->finishRenderingExample($reporterEvent); } else { parent::update($method, $reporterEvent); } }
public function update(\SplSubject $subject, $reporterEvent = null) { if ($reporterEvent->event == 'exit') { parent::update($subject, $reporterEvent); } }