src/Serializer/YamlSerializer.php
public function serialize(Message $message, array $options = [])
    {
        if (!isset($options['yaml_inline'])) {
            $options['yaml_inline'] = 3;
        }

        if (!isset($options['yaml_indent'])) {
            $options['yaml_indent'] = 2;
        }

        return Yaml::dump(
            parent::serialize($message, $options),
            (int) $options['yaml_inline'],
            (int) $options['yaml_indent']
        );
    }
public function serialize(Message $message, array $options = [])
    {
        if (!isset($options['yaml_inline'])) {
            $options['yaml_inline'] = 3;
        }

        if (!isset($options['yaml_indent'])) {
            $options['yaml_indent'] = 2;
        }

        return Yaml::dump(
            parent::serialize($message, $options),
            (int) $options['yaml_inline'],
            (int) $options['yaml_indent']
        );
    }
public function serialize ( Message $ message , array $ options = [ ] ) { if ( ! isset ( $ options [ 'yaml_inline' ] ) ) { $ options [ 'yaml_inline' ] = 3 ; } if ( ! isset ( $ options [ 'yaml_indent' ] ) ) { $ options [ 'yaml_indent' ] = 2 ; } return Yaml :: dump ( parent :: serialize ( $ message , $ options ) , ( int ) $ options [ 'yaml_inline' ] , ( int ) $ options [ 'yaml_indent' ] ) ; }
{@inheritdoc}

Note that the greater the yaml_inline option the slower it is.
3 provides really good human readability but if you need
speed use 0 or 1.
{ @inheritdoc }