Skip to content

Commit

Permalink
- Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Nov 15, 2019
1 parent 9a69200 commit 1610605
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/IPub/Phone/Entities/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
1 change: 1 addition & 0 deletions tests/IPubTests/Phone/ExtensionTest.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/**
* Test: IPub\Phone\Extension
*
* @testCase
*
* @copyright More in license.md
Expand Down
5 changes: 3 additions & 2 deletions tests/IPubTests/Phone/PhoneHelpersTest.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/**
* Test: IPub\Phone\Validator
*
* @testCase
*
* @copyright More in license.md
Expand Down Expand Up @@ -121,11 +122,11 @@ class PhoneHelpersTest extends Tester\TestCase

public function testFormatPhoneWithInvalidNumber()
{
Assert::exception(function() {
Assert::exception(function () {
$this->phone->format('0499123456', 'US');
}, 'IPub\Phone\Exceptions\NoValidPhoneException');

Assert::exception(function() {
Assert::exception(function () {
$this->phone->format('016123456', 'NL');
}, 'IPub\Phone\Exceptions\NoValidPhoneException');
}
Expand Down

0 comments on commit 1610605

Please sign in to comment.