src/Encoder/ArrayEncoder.php
private function getFormattedArray(array $array, $depth, array $options, callable $encode)
    {
        $lines = $this->getPairs($array, ' ', $options['array.omit'], $encode, $omitted);

        if ($omitted && $options['array.inline'] !== false) {
            $output = $this->getInlineArray($lines, $options);

            if ($output !== false) {
                return $output;
            }
        }

        return $this->buildArray($lines, $depth, $options);
    }
private function getFormattedArray(array $array, $depth, array $options, callable $encode)
    {
        $lines = $this->getPairs($array, ' ', $options['array.omit'], $encode, $omitted);

        if ($omitted && $options['array.inline'] !== false) {
            $output = $this->getInlineArray($lines, $options);

            if ($output !== false) {
                return $output;
            }
        }

        return $this->buildArray($lines, $depth, $options);
    }
private function getFormattedArray ( array $ array , $ depth , array $ options , callable $ encode ) { $ lines = $ this -> getPairs ( $ array , ' ' , $ options [ 'array.omit' ] , $ encode , $ omitted ) ; if ( $ omitted && $ options [ 'array.inline' ] !== false ) { $ output = $ this -> getInlineArray ( $ lines , $ options ) ; if ( $ output !== false ) { return $ output ; } } return $ this -> buildArray ( $ lines , $ depth , $ options ) ; }
Returns the PHP code for the array as inline or multi line array.
@param array $array Array to encode
@param int $depth Current indentation depth of the output
@param array $options List of encoder options
@param callable $encode Callback used to encode values
@return string The PHP code representation for the array
Returns the PHP code for the array as inline or multi line array .