src/Report/ReporterFactory.php
public function registerReporter(ReporterInterface $reporter)
    {
        $format = $reporter->getFormat();

        if (isset($this->reporters[$format])) {
            throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
        }

        $this->reporters[$format] = $reporter;

        return $this;
    }
public function registerReporter(ReporterInterface $reporter)
    {
        $format = $reporter->getFormat();

        if (isset($this->reporters[$format])) {
            throw new \UnexpectedValueException(sprintf('Reporter for format "%s" is already registered.', $format));
        }

        $this->reporters[$format] = $reporter;

        return $this;
    }
public function registerReporter ( ReporterInterface $ reporter ) { $ format = $ reporter -> getFormat ( ) ; if ( isset ( $ this -> reporters [ $ format ] ) ) { throw new \ UnexpectedValueException ( sprintf ( 'Reporter for format "%s" is already registered.' , $ format ) ) ; } $ this -> reporters [ $ format ] = $ reporter ; return $ this ; }
@param ReporterInterface $reporter

@return $this
@param ReporterInterface $reporter