Common/Util/FormatterAwareTrait.php
protected function getFormatter()
    {
        if ($this->formatter) {
            return $this->formatter;
        }

        if (!$this->formatterFactory) {
            throw new RuntimeException("Please call setFormatterFactory() first.");
        }

        return $this->formatter = $this->formatterFactory->create();
    }
protected function getFormatter()
    {
        if ($this->formatter) {
            return $this->formatter;
        }

        if (!$this->formatterFactory) {
            throw new RuntimeException("Please call setFormatterFactory() first.");
        }

        return $this->formatter = $this->formatterFactory->create();
    }
Returns the formatter.

@return Formatter