From 1b001ad2efc98943cf3581ff4c10690bafd5b481 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 4 Jan 2009 19:27:20 -0800 Subject: [PATCH] Remove an unnecessary if/else and replace it with a single return statement * Functions.php: (BSFunctions::is_valid_email) --- Functions.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Functions.php b/Functions.php index 91a8eee..92195b5 100644 --- a/Functions.php +++ b/Functions.php @@ -213,14 +213,7 @@ class BSFunctions */ public static function is_valid_email($email) { - if (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email)) - { - return true; - } - else - { - return false; - } + return (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email)); } /** -- 2.43.5