public function __construct(FormatterInterface $formatter = null) { $this->formatter = $formatter ?: new FormatterCollection([new LinkFormatter(), new EncodeFormatter()]); }