From d32bf0370df0228594911d7ca686a56bacfe7fae Mon Sep 17 00:00:00 2001 From: Andrew Mcdonald Date: Wed, 10 May 2017 14:33:28 +0100 Subject: [PATCH] fixed tokenizer --- src/Utils/Tokenizer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Utils/Tokenizer.php b/src/Utils/Tokenizer.php index 4f14c7a..bd053e6 100755 --- a/src/Utils/Tokenizer.php +++ b/src/Utils/Tokenizer.php @@ -27,8 +27,11 @@ public static function inward($postcode) private function sanityCheck($postcode) { $validated = Validator::validatePostcode($postcode); + if(!$validated) + { + throw new Exception("Post code provided is not valid"); + } - throw new Exception("Post code provided is not valid"); } } \ No newline at end of file