src/Commands/Status.php
protected function parseTable($input)
    {
        $input = (array) $input;

        return array_map(function ($key, $value) {
            $bytes = ['used_memory', 'free_memory', 'wasted_memory', 'buffer_size'];
            $times = ['start_time', 'last_restart_time'];

            if (in_array($key, $bytes)) {
                $value = number_format($value / 1048576, 2).' MB';
            } elseif (in_array($key, $times)) {
                $value = date('Y-m-d H:i:s', $value);
            }

            return [
                'key'       => $key,
                'value'     => $value,
            ];
        }, array_keys($input), $input);
    }
protected function parseTable($input)
    {
        $input = (array) $input;

        return array_map(function ($key, $value) {
            $bytes = ['used_memory', 'free_memory', 'wasted_memory', 'buffer_size'];
            $times = ['start_time', 'last_restart_time'];

            if (in_array($key, $bytes)) {
                $value = number_format($value / 1048576, 2).' MB';
            } elseif (in_array($key, $times)) {
                $value = date('Y-m-d H:i:s', $value);
            }

            return [
                'key'       => $key,
                'value'     => $value,
            ];
        }, array_keys($input), $input);
    }
protected function parseTable ( $ input ) { $ input = ( array ) $ input ; return array_map ( function ( $ key , $ value ) { $ bytes = [ 'used_memory' , 'free_memory' , 'wasted_memory' , 'buffer_size' ] ; $ times = [ 'start_time' , 'last_restart_time' ] ; if ( in_array ( $ key , $ bytes ) ) { $ value = number_format ( $ value / 1048576 , 2 ) . ' MB' ; } elseif ( in_array ( $ key , $ times ) ) { $ value = date ( 'Y-m-d H:i:s' , $ value ) ; } return [ 'key' => $ key , 'value' => $ value , ] ; } , array_keys ( $ input ) , $ input ) ; }
Make up the table for console display.

@param $input

@return array
Make up the table for console display .