summaryrefslogtreecommitdiff
path: root/includes/helper/message_helper.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 03:22:48 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 03:22:48 +0100
commit356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch)
treee02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/helper/message_helper.php
parentd71e7bbfad2f07f82df0c515608996d250fd4182 (diff)
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/helper/message_helper.php')
-rw-r--r--includes/helper/message_helper.php37
1 files changed, 29 insertions, 8 deletions
diff --git a/includes/helper/message_helper.php b/includes/helper/message_helper.php
index a085aa0e..613ac32e 100644
--- a/includes/helper/message_helper.php
+++ b/includes/helper/message_helper.php
@@ -2,6 +2,8 @@
/**
* Gibt zwischengespeicherte Fehlermeldungen zurück und löscht den Zwischenspeicher
+ *
+ * @return string
*/
function msg()
{
@@ -15,34 +17,51 @@ function msg()
/**
* Rendert eine Information
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
*/
-function info($msg, $immediatly = false)
+function info($msg, $immediately = false)
{
- return alert('info', $msg, $immediatly);
+ return alert('info', $msg, $immediately);
}
/**
* Rendert eine Fehlermeldung
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
*/
-function error($msg, $immediatly = false)
+function error($msg, $immediately = false)
{
- return alert('danger', $msg, $immediatly);
+ return alert('danger', $msg, $immediately);
}
/**
* Rendert eine Erfolgsmeldung
+ *
+ * @param string $msg
+ * @param bool $immediately
+ * @return string
*/
-function success($msg, $immediatly = false)
+function success($msg, $immediately = false)
{
- return alert('success', $msg, $immediatly);
+ return alert('success', $msg, $immediately);
}
/**
* Renders an alert with given alert-* class.
+ *
+ * @param string $class
+ * @param string $msg
+ * @param bool $immediately
+ * @return string|null
*/
-function alert($class, $msg, $immediatly = false)
+function alert($class, $msg, $immediately = false)
{
- if ($immediatly) {
+ if ($immediately) {
if ($msg == "") {
return "";
}
@@ -53,4 +72,6 @@ function alert($class, $msg, $immediatly = false)
$_SESSION['msg'] = "";
}
$_SESSION['msg'] .= alert($class, $msg, true);
+
+ return null;
}