summaryrefslogtreecommitdiff
path: root/includes/view/UserHintsRenderer.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-02 03:57:23 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 03:57:23 +0100
commit7313e15ce8236e19331fb6639a3a5b97c8f06ecd (patch)
tree399e5eaa403d6dd5993ca8fb6f2162319d2ed2e1 /includes/view/UserHintsRenderer.php
parentb839e401062b294292fdcbd7e30b79bc149fab6f (diff)
PSR-2 formatting
Diffstat (limited to 'includes/view/UserHintsRenderer.php')
-rw-r--r--includes/view/UserHintsRenderer.php52
1 files changed, 27 insertions, 25 deletions
diff --git a/includes/view/UserHintsRenderer.php b/includes/view/UserHintsRenderer.php
index cf4b1414..30281ea0 100644
--- a/includes/view/UserHintsRenderer.php
+++ b/includes/view/UserHintsRenderer.php
@@ -2,24 +2,25 @@
namespace Engelsystem;
-class UserHintsRenderer {
+class UserHintsRenderer
+{
+ private $hints = [];
- private $hints = [];
-
- private $important = false;
+ private $important = false;
/**
* Render the added hints to a popover for the toolbar.
*/
- public function render() {
- if (count($this->hints) > 0) {
- $hint_class = $this->important ? 'danger' : 'info';
- $glyphicon = $this->important ? 'warning-sign' : 'info-sign';
+ public function render()
+ {
+ if (count($this->hints) > 0) {
+ $hint_class = $this->important ? 'danger' : 'info';
+ $glyphicon = $this->important ? 'warning-sign' : 'info-sign';
- return toolbar_popover($glyphicon . ' text-' . $hint_class, '', $this->hints, 'bg-' . $hint_class);
- }
+ return toolbar_popover($glyphicon . ' text-' . $hint_class, '', $this->hints, 'bg-' . $hint_class);
+ }
- return '';
+ return '';
}
/**
@@ -30,30 +31,31 @@ class UserHintsRenderer {
* @param boolean $important
* Is the hint important?
*/
- public function addHint($hint, $important = false) {
- if ($hint != null && $hint != '') {
- if ($important) {
- $this->important = true;
- $this->hints[] = error($hint, true);
- } else {
- $this->hints[] = info($hint, true);
+ public function addHint($hint, $important = false)
+ {
+ if ($hint != null && $hint != '') {
+ if ($important) {
+ $this->important = true;
+ $this->hints[] = error($hint, true);
+ } else {
+ $this->hints[] = info($hint, true);
+ }
}
- }
}
/**
* Get all hints.
*/
- public function getHints() {
- return $this->hints;
+ public function getHints()
+ {
+ return $this->hints;
}
/**
* Are there important hints? This leads to a more intensive icon.
*/
- public function isImportant() {
- return $this->important;
+ public function isImportant()
+ {
+ return $this->important;
}
}
-
-?> \ No newline at end of file