public function parse(string $value)
    {
        $parsedValue = $this->parser->parse($value);
        if (false === $parsedValue instanceof ListValue) {
            return $parsedValue;
        }

        $mergedValues = array_reduce(
            $parsedValue->getValue(),
            [$this, 'mergeStrings'],
            $initial = []
        );

        return (1 === count($mergedValues))
            ? $mergedValues[0]
            : new ListValue($mergedValues)
        ;
    }
public function parse(string $value)
    {
        $parsedValue = $this->parser->parse($value);
        if (false === $parsedValue instanceof ListValue) {
            return $parsedValue;
        }

        $mergedValues = array_reduce(
            $parsedValue->getValue(),
            [$this, 'mergeStrings'],
            $initial = []
        );

        return (1 === count($mergedValues))
            ? $mergedValues[0]
            : new ListValue($mergedValues)
        ;
    }
public function parse ( string $ value ) { $ parsedValue = $ this -> parser -> parse ( $ value ) ; if ( false === $ parsedValue instanceof ListValue ) { return $ parsedValue ; } $ mergedValues = array_reduce ( $ parsedValue -> getValue ( ) , [ $ this , 'mergeStrings' ] , $ initial = [ ] ) ; return ( 1 === count ( $ mergedValues ) ) ? $ mergedValues [ 0 ] : new ListValue ( $ mergedValues ) ; }
Uses the decorated parser to parse the value and then walk through the list of values to merge two successive
strings.

{@inheritdoc}
Uses the decorated parser to parse the value and then walk through the list of values to merge two successive strings .