protected function parsePropertyValue($value)
    {
        $return = '';

        if (is_array($value)) {
            $withStringIndex = (bool) array_filter(array_keys($value), 'is_string');

            if ($withStringIndex) {
                $return = preg_replace(
                    ['/^(array ?\( *)/', '/\)$/'],
                    ['[', ']'],
                    str_replace("\n", '', var_export($value, true))
                );
            } else {
                $return =
                    '[' .
                    rtrim(
                        array_reduce(
                            $value,
                            function ($combined, $single) {
                                return $combined . var_export($single, true) . ', ';
                            },
                            ''
                        ),
                        ', '
                    ) .
                    ']';
            } // else
        } else {
            $return = var_export($value, true);
        } // else

        return $return;
    }
protected function parsePropertyValue($value)
    {
        $return = '';

        if (is_array($value)) {
            $withStringIndex = (bool) array_filter(array_keys($value), 'is_string');

            if ($withStringIndex) {
                $return = preg_replace(
                    ['/^(array ?\( *)/', '/\)$/'],
                    ['[', ']'],
                    str_replace("\n", '', var_export($value, true))
                );
            } else {
                $return =
                    '[' .
                    rtrim(
                        array_reduce(
                            $value,
                            function ($combined, $single) {
                                return $combined . var_export($single, true) . ', ';
                            },
                            ''
                        ),
                        ', '
                    ) .
                    ']';
            } // else
        } else {
            $return = var_export($value, true);
        } // else

        return $return;
    }
protected function parsePropertyValue ( $ value ) { $ return = '' ; if ( is_array ( $ value ) ) { $ withStringIndex = ( bool ) array_filter ( array_keys ( $ value ) , 'is_string' ) ; if ( $ withStringIndex ) { $ return = preg_replace ( [ '/^(array ?\( *)/' , '/\)$/' ] , [ '[' , ']' ] , str_replace ( "\n" , '' , var_export ( $ value , true ) ) ) ; } else { $ return = '[' . rtrim ( array_reduce ( $ value , function ( $ combined , $ single ) { return $ combined . var_export ( $ single , true ) . ', ' ; } , '' ) , ', ' ) . ']' ; } // else } else { $ return = var_export ( $ value , true ) ; } // else return $ return ; }
Parses the given value to an exportable php code.
@param string|array $value
@return string
Parses the given value to an exportable php code .