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