Added Helper Functions

This commit is contained in:
Ryonia Coruscare 2019-09-05 13:45:05 +12:00
parent 5af5373550
commit eb1780247f
Signed by: ryonia
GPG key ID: 5040C0F02BC53C5A

View file

@ -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
{
/**