/** * Gets the formatter from world and register it into the reporter */ protected function setFormatter() { $formatterOption = $this->_world->getOption('formatter'); $formatter = $this->getFormatterFactory()->create($formatterOption, $this->_world->getReporter()); $this->_world->getReporter()->addFormatter($formatter); }
/** * Gets formatter * * @param \PHPSpec\World $world */ public function getFormatter(World $world) { return $this->getFormatterFactory()->create($world->getOption('f'), $world->getReporter()); }