src/Formatter/SymbolFormatter/Chain.php
public function addFormatter(SymbolFormatterInterface $formatter)
    {
        if ($formatter instanceof self) {
            // Reducing recursivity
            $this->addFormatters($formatter->formatters);
        } else {
            $this->formatters[] = $formatter;
        }

        return $this;
    }
public function addFormatter(SymbolFormatterInterface $formatter)
    {
        if ($formatter instanceof self) {
            // Reducing recursivity
            $this->addFormatters($formatter->formatters);
        } else {
            $this->formatters[] = $formatter;
        }

        return $this;
    }
public function addFormatter ( SymbolFormatterInterface $ formatter ) { if ( $ formatter instanceof self ) { // Reducing recursivity $ this -> addFormatters ( $ formatter -> formatters ) ; } else { $ this -> formatters [ ] = $ formatter ; } return $ this ; }
Adds a formatter to the chain.

@param SymbolFormatterInterface $formatter
Adds a formatter to the chain .