From eb1780247f7cad18cddff1376be0b3e00dca7273 Mon Sep 17 00:00:00 2001 From: Ryonez Coruscare Date: Thu, 5 Sep 2019 13:45:05 +1200 Subject: [PATCH] Added Helper Functions --- Notification/Discord.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Notification/Discord.php b/Notification/Discord.php index 348669f..6b3763f 100644 --- a/Notification/Discord.php +++ b/Notification/Discord.php @@ -15,6 +15,16 @@ use Kanboard\Model\TaskFileModel; * @package notification * @author Ryonez Coruscare */ + + +// Helper functions + +function clean($string) +{ + $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. + return preg_replace('/[^A-Za-z0-9\-.]/', '', $string); // Removes special chars. +} + class Discord extends Base implements NotificationInterface { /**