N98\Magento\Command\Database\AbstractShowCommand::formatVariables PHP Method

formatVariables() protected method

protected formatVariables ( array $vars ) : array
$vars array
return array
    protected function formatVariables(array $vars)
    {
        $rounding = (int) $this->_input->getOption('rounding');
        if ($rounding > -1) {
            foreach ($vars as $k => &$v) {
                if (true === $this->allowRounding($k)) {
                    $v = Filesystem::humanFileSize($v, $rounding);
                }
                if (isset($this->_specialFormat[$k])) {
                    $v = $this->{$this->_specialFormat[$k]}($v);
                }
            }
            unset($v);
        }
        $maxWidth = $this->getMaxValueWidth($vars);
        // align=right
        foreach ($vars as &$v) {
            $v = str_pad($v, $maxWidth, ' ', STR_PAD_LEFT);
        }
        return $vars;
    }