protected function formatTags(array $data = [], $colour = null)
    {
        $info = [];
        foreach ($data as $key => $value) {
            $length = isset($this->maxLengths[$key]) ? '-' . $this->maxLengths[$key] : '';
            if (!is_null($colour)) {
                $valueFormat = sprintf("<options=bold;fg=%s>%{$length}s</>", $colour, $value);
            } else {
                $valueFormat = sprintf("%{$length}s", $value);
            }
            if (is_int($key)) {
                $info[] = $valueFormat;
            } else {
                $info[] = sprintf("<info>%s</info>: %s", $key, $valueFormat);
            }
        }
        return implode(' ', $info);
    }
protected function formatTags(array $data = [], $colour = null)
    {
        $info = [];
        foreach ($data as $key => $value) {
            $length = isset($this->maxLengths[$key]) ? '-' . $this->maxLengths[$key] : '';
            if (!is_null($colour)) {
                $valueFormat = sprintf("<options=bold;fg=%s>%{$length}s</>", $colour, $value);
            } else {
                $valueFormat = sprintf("%{$length}s", $value);
            }
            if (is_int($key)) {
                $info[] = $valueFormat;
            } else {
                $info[] = sprintf("<info>%s</info>: %s", $key, $valueFormat);
            }
        }
        return implode(' ', $info);
    }
protected function formatTags ( array $ data = [ ] , $ colour = null ) { $ info = [ ] ; foreach ( $ data as $ key => $ value ) { $ length = isset ( $ this -> maxLengths [ $ key ] ) ? '-' . $ this -> maxLengths [ $ key ] : '' ; if ( ! is_null ( $ colour ) ) { $ valueFormat = sprintf ( "<options=bold;fg=%s>%{$length}s</>" , $ colour , $ value ) ; } else { $ valueFormat = sprintf ( "%{$length}s" , $ value ) ; } if ( is_int ( $ key ) ) { $ info [ ] = $ valueFormat ; } else { $ info [ ] = sprintf ( "<info>%s</info>: %s" , $ key , $ valueFormat ) ; } } return implode ( ' ' , $ info ) ; }
Format an array of input tags

@param array       $data
@param string|null $colour

@return string
Format an array of input tags