From 5dd7f4d0fbca58229c7fd7205559afd89b3fb1a6 Mon Sep 17 00:00:00 2001 From: bkrukowski Date: Fri, 14 Oct 2016 21:15:15 +0200 Subject: [PATCH] Documentation --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3376a34..d608f32 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,17 @@ To detect multi-accounts on your website. ```php use bkrukowski\TransparentEmail\TransparentEmailFactory; use bkrukowski\TransparentEmail\Emails\Email; +use bkrukowski\TransparentEmail\Emails\EmailInterface; use bkrukowski\TransparentEmail\Emails\InvalidEmailException; try { $cleaner = TransparentEmailFactory::createDefault(); - $transformedEmail = $cleaner->getPrimaryEmail(new Email('John.Doe+alias@gmail.com')); + $inputEmail = new Email('John.Doe+alias@gmail.com'); + /** @var EmailInterface $transformedEmail */ + $transformedEmail = $cleaner->getPrimaryEmail($inputEmail); + echo $transformedEmail; } catch (InvalidEmailException $exception) { - // do something + echo 'Invalid email!'; } ```