Debug_Bar_Pretty_Output::get_pretty_bool PHP Method

get_pretty_bool() private static method

Convert a boolean to pretty output.
private static get_pretty_bool ( boolean $bool, boolean $short = false ) : string
$bool boolean The boolean variable to make pretty.
$short boolean Short or normal annotation.
return string
        private static function get_pretty_bool($bool, $short = false)
        {
            $output = '<span style="color: #000099;">';
            if (true !== $short) {
                $output .= '<b><i>bool</i></b> : ' . $bool . ' ( = ';
            } else {
                $output .= '<b><i>b</i></b> ';
            }
            $output .= '<i>';
            if (false === $bool) {
                $output .= '<span style="color: #FF0000;">false</span>';
            } elseif (true === $bool) {
                $output .= '<span style="color: #336600;">true</span>';
            } else {
                $output .= __('undetermined', 'db-pretty-output');
            }
            $output .= ' </i>';
            if (true !== $short) {
                $output .= ')';
            }
            $output .= '</span><br />';
            return $output;
        }