src/Config.php
public function setFormatter($formatter)
    {
        if ($formatter === null) {
            $formatter = new SerializeFormatter();
        }

        if (!$formatter instanceof FormatterInterface) {
            throw new Exception('Formatter must be an instance of Flintstone\Formatter\FormatterInterface');
        }

        $this->config['formatter'] = $formatter;
    }
public function setFormatter($formatter)
    {
        if ($formatter === null) {
            $formatter = new SerializeFormatter();
        }

        if (!$formatter instanceof FormatterInterface) {
            throw new Exception('Formatter must be an instance of Flintstone\Formatter\FormatterInterface');
        }

        $this->config['formatter'] = $formatter;
    }
Set the formatter.

@param FormatterInterface|null $formatter

@throws Exception