lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php
private function formatValue($value)
    {
        if ($value === '') {
            return '';
        }

        if ($value === null) {
            return '<comment>Null</comment>';
        }

        if (is_bool($value)) {
            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
        }

        if (empty($value)) {
            return '<comment>Empty</comment>';
        }

        if (is_array($value)) {
            return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
        }

        if (is_object($value)) {
            return sprintf('<%s>', get_class($value));
        }

        if (is_scalar($value)) {
            return $value;
        }

        throw new InvalidArgumentException(sprintf('Do not know how to format value "%s"', print_r($value, true)));
    }
private function formatValue($value)
    {
        if ($value === '') {
            return '';
        }

        if ($value === null) {
            return '<comment>Null</comment>';
        }

        if (is_bool($value)) {
            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
        }

        if (empty($value)) {
            return '<comment>Empty</comment>';
        }

        if (is_array($value)) {
            return json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
        }

        if (is_object($value)) {
            return sprintf('<%s>', get_class($value));
        }

        if (is_scalar($value)) {
            return $value;
        }

        throw new InvalidArgumentException(sprintf('Do not know how to format value "%s"', print_r($value, true)));
    }
private function formatValue ( $ value ) { if ( $ value === '' ) { return '' ; } if ( $ value === null ) { return '<comment>Null</comment>' ; } if ( is_bool ( $ value ) ) { return '<comment>' . ( $ value ? 'True' : 'False' ) . '</comment>' ; } if ( empty ( $ value ) ) { return '<comment>Empty</comment>' ; } if ( is_array ( $ value ) ) { return json_encode ( $ value , JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) ; } if ( is_object ( $ value ) ) { return sprintf ( '<%s>' , get_class ( $ value ) ) ; } if ( is_scalar ( $ value ) ) { return $ value ; } throw new InvalidArgumentException ( sprintf ( 'Do not know how to format value "%s"' , print_r ( $ value , true ) ) ) ; }
Format the given value for console output

@param mixed $value

@return string
Format the given value for console output