From 7d3895cfd4575bc0238ea6f2cb548a418f3f487f Mon Sep 17 00:00:00 2001 From: bkrukowski Date: Sat, 24 Sep 2016 12:54:02 +0200 Subject: [PATCH] Documentation --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 84616fb..b11a350 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,16 @@ To detect multi-accounts on your website. ## Usage ```php -use \bkrukowski\TransparentEmail\TransparentEmail; -use \bkrukowski\TransparentEmail\Emails\Email; +use bkrukowski\TransparentEmail\TransparentEmail; +use bkrukowski\TransparentEmail\Emails\Email; +use bkrukowski\TransparentEmail\Emails\InvalidEmailException; -$cleaner = new TransparentEmail(); -$transformedEmail = $cleaner->getPrimaryEmail(new Email('John.Doe+alias@gmail.com')); +try { + $cleaner = new TransparentEmail(); + $transformedEmail = $cleaner->getPrimaryEmail(new Email('John.Doe+alias@gmail.com')); +} catch (InvalidEmailException $exception) { + // do something +} ``` ## Yahoo.com