public function encode(array $options = [])
    {
        $options = array_merge(
            [
                'inline'                        => 2,
                'indent'                        => 4,
                'exceptionOnInvalidType'        => false,
                'objectSupport'                 => false
            ],
            $options
        );

        return SymfonyYaml::dump(
            $this->getContents(),
            $options['inline'],
            $options['indent'],
            $options['exceptionOnInvalidType'],
            $options['objectSupport']
        );
    }