From 53b0c7bda9a7dd1a7c36d44987bba1329b3890bb Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 5 Feb 2017 17:59:06 -0500 Subject: Remove method getMailboxHash() --- app/Helper/MailHelper.php | 19 ------------------- tests/units/Helper/MailHelperTest.php | 8 -------- 2 files changed, 27 deletions(-) diff --git a/app/Helper/MailHelper.php b/app/Helper/MailHelper.php index cb16d6f8..e0d28df3 100644 --- a/app/Helper/MailHelper.php +++ b/app/Helper/MailHelper.php @@ -12,25 +12,6 @@ use Kanboard\Core\Base; */ class MailHelper extends Base { - /** - * Get the mailbox hash from an email address - * - * @access public - * @param string $email - * @return string - */ - public function getMailboxHash($email) - { - if (! strpos($email, '@') || ! strpos($email, '+')) { - return ''; - } - - list($localPart, ) = explode('@', $email); - list(, $identifier) = explode('+', $localPart); - - return $identifier; - } - /** * Filter mail subject * diff --git a/tests/units/Helper/MailHelperTest.php b/tests/units/Helper/MailHelperTest.php index c6f13042..26152a69 100644 --- a/tests/units/Helper/MailHelperTest.php +++ b/tests/units/Helper/MailHelperTest.php @@ -6,14 +6,6 @@ use Kanboard\Helper\MailHelper; class MailHelperTest extends Base { - public function testMailboxHash() - { - $helper = new MailHelper($this->container); - $this->assertEquals('test1', $helper->getMailboxHash('a+test1@localhost')); - $this->assertEquals('', $helper->getMailboxHash('test1@localhost')); - $this->assertEquals('', $helper->getMailboxHash('test1')); - } - public function testFilterSubject() { $helper = new MailHelper($this->container); -- cgit v1.2.3