From 7313e15ce8236e19331fb6639a3a5b97c8f06ecd Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 2 Jan 2017 03:57:23 +0100 Subject: PSR-2 formatting --- includes/sys_template.php | 296 +++++++++++++++++++++++++--------------------- 1 file changed, 160 insertions(+), 136 deletions(-) (limited to 'includes/sys_template.php') diff --git a/includes/sys_template.php b/includes/sys_template.php index 3679328b..059d3169 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -8,16 +8,17 @@ $themes = [ '3' => "Engelsystem 32c3 (2015)", "2" => "Engelsystem cccamp15", "0" => "Engelsystem light", - "1" => "Engelsystem dark" + "1" => "Engelsystem dark" ]; /** * Display muted (grey) text. * - * @param string $text + * @param string $text */ -function mute($text) { - return '' . $text . ''; +function mute($text) +{ + return '' . $text . ''; } /** @@ -28,84 +29,96 @@ function mute($text) { * @param string $class * default, primary, info, success, warning, danger */ -function label($content, $class = 'default') { - return '' . $content . ''; +function label($content, $class = 'default') +{ + return '' . $content . ''; } -function progress_bar($valuemin, $valuemax, $valuenow, $class = '', $content = '') { - return '
' . $content . '
'; +function progress_bar($valuemin, $valuemax, $valuenow, $class = '', $content = '') +{ + return '
' . $content . '
'; } /** * Render glyphicon * - * @param string $glyph_name + * @param string $glyph_name */ -function glyph($glyph_name) { - return ' '; +function glyph($glyph_name) +{ + return ' '; } /** * Renders a tick or a cross by given boolean * - * @param boolean $boolean + * @param boolean $boolean */ -function glyph_bool($boolean) { - return '' . glyph($boolean ? 'ok' : 'remove') . ''; +function glyph_bool($boolean) +{ + return '' . glyph($boolean ? 'ok' : 'remove') . ''; } -function div($class, $content = [], $dom_id = "") { - if (is_array($content)) { - $content = join("\n", $content); - } - $dom_id = $dom_id != '' ? ' id="' . $dom_id . '"' : ''; - return '' . $content . ''; +function div($class, $content = [], $dom_id = "") +{ + if (is_array($content)) { + $content = join("\n", $content); + } + $dom_id = $dom_id != '' ? ' id="' . $dom_id . '"' : ''; + return '' . $content . ''; } -function heading($content, $number = 1) { - return "" . $content . ""; +function heading($content, $number = 1) +{ + return "" . $content . ""; } /** * Render a toolbar. * - * @param array $items + * @param array $items * @return string */ -function toolbar($items = [], $right = false) { - return ''; +function toolbar($items = [], $right = false) +{ + return ''; } -function toolbar_pills($items) { - return ''; +function toolbar_pills($items) +{ + return ''; } /** * Render a link for a toolbar. * - * @param string $href - * @param string $glyphicon - * @param string $label - * @param bool $selected + * @param string $href + * @param string $glyphicon + * @param string $label + * @param bool $selected * @return string */ -function toolbar_item_link($href, $glyphicon, $label, $selected = false) { - return '
  • ' . ($glyphicon != '' ? ' ' : '') . $label . '
  • '; +function toolbar_item_link($href, $glyphicon, $label, $selected = false) +{ + return '
  • ' . ($glyphicon != '' ? ' ' : '') . $label . '
  • '; } -function toolbar_item_divider() { - return '
  • '; +function toolbar_item_divider() +{ + return '
  • '; } -function toolbar_dropdown($glyphicon, $label, $submenu, $class = '') { - return ''; } -function toolbar_popover($glyphicon, $label, $content, $class = '') { - $dom_id = md5(microtime() . $glyphicon . $label); - return '