From 1610605d9236a4e3d5b138709e2acf504e91f700 Mon Sep 17 00:00:00 2001 From: Adam Kadlec Date: Fri, 15 Nov 2019 20:14:59 +0100 Subject: [PATCH] - Code formatting --- src/IPub/Phone/Entities/Phone.php | 2 +- tests/IPubTests/Phone/ExtensionTest.phpt | 1 + tests/IPubTests/Phone/PhoneHelpersTest.phpt | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/IPub/Phone/Entities/Phone.php b/src/IPub/Phone/Entities/Phone.php index fcd6228..6e13d5f 100644 --- a/src/IPub/Phone/Entities/Phone.php +++ b/src/IPub/Phone/Entities/Phone.php @@ -325,7 +325,7 @@ public static function fromNumber(string $number, string $country = 'AUTO') if ($country === 'AUTO' || $country === NULL) { $country = 'AUTO'; - } else if (strlen($country) !== 2 || ctype_alpha($country) === FALSE || !in_array($country, $phoneNumberUtil->getSupportedRegions())) { + } elseif (strlen($country) !== 2 || ctype_alpha($country) === FALSE || !in_array($country, $phoneNumberUtil->getSupportedRegions())) { throw new Exceptions\NoValidCountryException(sprintf('Provided country code "%s" is not valid. Provide valid country code or AUTO for automatic detection.', $country)); } diff --git a/tests/IPubTests/Phone/ExtensionTest.phpt b/tests/IPubTests/Phone/ExtensionTest.phpt index 97261f6..263380f 100644 --- a/tests/IPubTests/Phone/ExtensionTest.phpt +++ b/tests/IPubTests/Phone/ExtensionTest.phpt @@ -1,6 +1,7 @@ phone->format('0499123456', 'US'); }, 'IPub\Phone\Exceptions\NoValidPhoneException'); - Assert::exception(function() { + Assert::exception(function () { $this->phone->format('016123456', 'NL'); }, 'IPub\Phone\Exceptions\NoValidPhoneException'); }