src/Encoder/ArrayEncoder.php
private function buildArray(array $lines, $depth, array $options)
    {
        $indent = $this->buildIndent($options['array.base'], $options['array.indent'], $depth + 1);
        $last = $this->buildIndent($options['array.base'], $options['array.indent'], $depth);
        $eol = $options['array.eol'] === false ? \PHP_EOL : (string) $options['array.eol'];

        return $this->wrap(
            sprintf('%s%s%s,%1$s%s', $eol, $indent, implode(',' . $eol . $indent, $lines), $last),
            $options['array.short']
        );
    }
private function buildArray(array $lines, $depth, array $options)
    {
        $indent = $this->buildIndent($options['array.base'], $options['array.indent'], $depth + 1);
        $last = $this->buildIndent($options['array.base'], $options['array.indent'], $depth);
        $eol = $options['array.eol'] === false ? \PHP_EOL : (string) $options['array.eol'];

        return $this->wrap(
            sprintf('%s%s%s,%1$s%s', $eol, $indent, implode(',' . $eol . $indent, $lines), $last),
            $options['array.short']
        );
    }
private function buildArray ( array $ lines , $ depth , array $ options ) { $ indent = $ this -> buildIndent ( $ options [ 'array.base' ] , $ options [ 'array.indent' ] , $ depth + 1 ) ; $ last = $ this -> buildIndent ( $ options [ 'array.base' ] , $ options [ 'array.indent' ] , $ depth ) ; $ eol = $ options [ 'array.eol' ] === false ? \ PHP_EOL : ( string ) $ options [ 'array.eol' ] ; return $ this -> wrap ( sprintf ( '%s%s%s,%1$s%s' , $ eol , $ indent , implode ( ',' . $ eol . $ indent , $ lines ) , $ last ) , $ options [ 'array.short' ] ) ; }
Builds the complete array from the encoded key and value pairs.
@param string[] $lines Encoded key and value pairs
@param int $depth Current indentation depth of the output
@param array $options List of encoder options
@return string Array encoded as PHP code
Builds the complete array from the encoded key and value pairs .