Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'reference' => '8a9382c005b7339feeb0c5b78906e335b520736e',
'name' => 'nextcloud/3rdparty',
),
'versions' =>
Expand Down Expand Up @@ -165,12 +165,12 @@ class InstalledVersions
),
'giggsey/libphonenumber-for-php' =>
array (
'pretty_version' => '8.12.20',
'version' => '8.12.20.0',
'pretty_version' => '8.12.24',
'version' => '8.12.24.0',
'aliases' =>
array (
),
'reference' => '743585979ef96f2be123518c0a58083cf678bd47',
'reference' => 'bbefdd7ff0bae7bf5a62fc9e8c939fb40dd6d638',
),
'giggsey/locale' =>
array (
Expand Down Expand Up @@ -314,7 +314,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'reference' => '8a9382c005b7339feeb0c5b78906e335b520736e',
),
'nextcloud/lognormalizer' =>
array (
Expand Down
14 changes: 7 additions & 7 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1033,17 +1033,17 @@
},
{
"name": "giggsey/libphonenumber-for-php",
"version": "8.12.20",
"version_normalized": "8.12.20.0",
"version": "8.12.24",
"version_normalized": "8.12.24.0",
"source": {
"type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
"reference": "743585979ef96f2be123518c0a58083cf678bd47"
"reference": "bbefdd7ff0bae7bf5a62fc9e8c939fb40dd6d638"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/743585979ef96f2be123518c0a58083cf678bd47",
"reference": "743585979ef96f2be123518c0a58083cf678bd47",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/bbefdd7ff0bae7bf5a62fc9e8c939fb40dd6d638",
"reference": "bbefdd7ff0bae7bf5a62fc9e8c939fb40dd6d638",
"shasum": ""
},
"require": {
Expand All @@ -1057,10 +1057,10 @@
"pear/versioncontrol_git": "^0.5",
"phing/phing": "^2.7",
"php-coveralls/php-coveralls": "^1.0|^2.0",
"symfony/console": "^2.8|^3.0",
"symfony/console": "^2.8|^3.0|^v4.4|^v5.2",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"time": "2021-03-17T11:05:55+00:00",
"time": "2021-05-26T10:08:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down
10 changes: 5 additions & 5 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'reference' => '8a9382c005b7339feeb0c5b78906e335b520736e',
'name' => 'nextcloud/3rdparty',
),
'versions' =>
Expand Down Expand Up @@ -139,12 +139,12 @@
),
'giggsey/libphonenumber-for-php' =>
array (
'pretty_version' => '8.12.20',
'version' => '8.12.20.0',
'pretty_version' => '8.12.24',
'version' => '8.12.24.0',
'aliases' =>
array (
),
'reference' => '743585979ef96f2be123518c0a58083cf678bd47',
'reference' => 'bbefdd7ff0bae7bf5a62fc9e8c939fb40dd6d638',
),
'giggsey/locale' =>
array (
Expand Down Expand Up @@ -288,7 +288,7 @@
'aliases' =>
array (
),
'reference' => 'ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'reference' => '8a9382c005b7339feeb0c5b78906e335b520736e',
),
'nextcloud/lognormalizer' =>
array (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class Versions
'doctrine/lexer' => '1.2.1@e864bbf5904cb8f5bb334f99209b48018522f042',
'egulias/email-validator' => '2.1.25@0dbf5d78455d4d6a41d186da50adc1122ec066f4',
'fgrosse/phpasn1' => 'v2.2.0@d1978f7abd580f3fc33561e7f71d4c12c7531fad',
'giggsey/libphonenumber-for-php' => '8.12.20@743585979ef96f2be123518c0a58083cf678bd47',
'giggsey/libphonenumber-for-php' => '8.12.24@bbefdd7ff0bae7bf5a62fc9e8c939fb40dd6d638',
'giggsey/locale' => '1.9@b07f1eace8072ccc61445ad8fbd493ff9d783043',
'guzzlehttp/guzzle' => '7.2.0@0aa74dfb41ae110835923ef10a9d803a22d50e79',
'guzzlehttp/promises' => '1.4.0@60d379c243457e073cff02bc323a2a86cb355631',
Expand Down Expand Up @@ -120,7 +120,7 @@ final class Versions
'web-auth/cose-lib' => 'v3.3.1@eea6fae63ff5c81bf98c115b1be5f38a69682c16',
'web-auth/metadata-service' => 'v3.3.1@8488d3a832a38cc81c670fce05de1e515c6e64b1',
'web-auth/webauthn-lib' => 'v3.3.1@e411527a41c1013512fccdfce61681eb36484c77',
'nextcloud/3rdparty' => 'dev-master@ddd1d67f008b1d0169021f3ea6a5a3398691ab77',
'nextcloud/3rdparty' => 'dev-master@8a9382c005b7339feeb0c5b78906e335b520736e',
);

private function __construct()
Expand Down
5 changes: 3 additions & 2 deletions giggsey/libphonenumber-for-php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"pear/pear-core-minimal": "^1.9",
"pear/pear_exception": "^1.0",
"symfony/phpunit-bridge": "^4.2 || ^5",
"symfony/console": "^2.8|^3.0",
"symfony/console": "^2.8|^3.0|^v4.4|^v5.2",
"php-coveralls/php-coveralls": "^1.0|^2.0"
},
"extra": {
Expand All @@ -79,6 +79,7 @@
}
},
"scripts": {
"test": "./phpunit"
"test": "./phpunit",
"metadata": "vendor/bin/phing compile"
}
}
23 changes: 14 additions & 9 deletions giggsey/libphonenumber-for-php/src/PhoneNumberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ protected static function createExtnPattern($forParsing)
$extLimitAfterLikelyLabel = 15;
$extLimitAfterAmbiguousChar = 9;
$extLimitWhenNotSure = 6;



$possibleSeparatorsBetweenNumberAndExtLabel = "[ \xC2\xA0\\t,]*";
// Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
Expand Down Expand Up @@ -2769,23 +2769,28 @@ public function formatOutOfCountryCallingNumber(PhoneNumber $number, $regionCall
return $this->format($number, PhoneNumberFormat::NATIONAL);
}
// Metadata cannot be null because we checked 'isValidRegionCode()' above.
/** @var PhoneMetadata $metadataForRegionCallingFrom */
$metadataForRegionCallingFrom = $this->getMetadataForRegion($regionCallingFrom);

$internationalPrefix = $metadataForRegionCallingFrom->getInternationalPrefix();

// For regions that have multiple international prefixes, the international format of the
// number is returned, unless there is a preferred international prefix.
// In general, if there is a preferred international prefix, use that. Otherwise, for regions
// that have multiple international prefixes, the international format of the number is
// returned since we would not know which one to use.
$internationalPrefixForFormatting = '';
$uniqueInternationalPrefixMatcher = new Matcher(static::SINGLE_INTERNATIONAL_PREFIX, $internationalPrefix);

if ($uniqueInternationalPrefixMatcher->matches()) {
$internationalPrefixForFormatting = $internationalPrefix;
} elseif ($metadataForRegionCallingFrom->hasPreferredInternationalPrefix()) {
if ($metadataForRegionCallingFrom->hasPreferredInternationalPrefix()) {
$internationalPrefixForFormatting = $metadataForRegionCallingFrom->getPreferredInternationalPrefix();
} else {
$uniqueInternationalPrefixMatcher = new Matcher(static::SINGLE_INTERNATIONAL_PREFIX, $internationalPrefix);

if ($uniqueInternationalPrefixMatcher->matches()) {
$internationalPrefixForFormatting = $internationalPrefix;
}
}

$regionCode = $this->getRegionCodeForCountryCode($countryCallingCode);
// Metadata cannot be null because the country calling code is valid.
/** @var PhoneMetadata $metadataForRegion */
$metadataForRegion = $this->getMetadataForRegionOrCallingCode($countryCallingCode, $regionCode);
$formattedNationalNumber = $this->formatNsn(
$nationalSignificantNumber,
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/211.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
21192 => 'MTN',
21195 => 'Network of the World',
21197 => 'Gemtel',
21198 => 'Digitel',
21199 => 'MTN',
);
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/212.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
212698 => 'Inwi',
212699 => 'Inwi',
21270 => 'Inwi',
21271 => 'Inwi',
21276 => 'Maroc Telecom',
21277 => 'Méditel',
);
59 changes: 0 additions & 59 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/225.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,6 @@

return array (
22501 => 'Moov',
22502 => 'Moov',
22503 => 'Moov',
22504 => 'MTN',
22505 => 'MTN',
22506 => 'MTN',
22507 => 'Orange',
22508 => 'Orange',
22509 => 'Orange',
225208 => 'Moov',
2252180 => 'Moov',
225228 => 'Moov',
225238 => 'Moov',
22540 => 'Moov',
22541 => 'Moov',
22542 => 'Moov',
22543 => 'Moov',
22544 => 'MTN',
22545 => 'MTN',
22546 => 'MTN',
22547 => 'Orange',
22548 => 'Orange',
22549 => 'Orange',
22550 => 'Moov',
22551 => 'Moov',
22552 => 'Moov',
22553 => 'Moov',
22554 => 'MTN',
22555 => 'MTN',
22556 => 'MTN',
22557 => 'Orange',
22558 => 'Orange',
22559 => 'Orange',
22560 => 'GreenN',
22561 => 'GreenN',
22564 => 'MTN',
22565 => 'MTN',
22566 => 'MTN',
22567 => 'Orange',
22568 => 'Orange',
22569 => 'Aircom',
22570 => 'Moov',
22571 => 'Moov',
22572 => 'Moov',
22573 => 'Moov',
22574 => 'MTN',
22575 => 'MTN',
22576 => 'MTN',
22577 => 'Orange',
22578 => 'Orange',
22579 => 'Orange',
22584 => 'MTN',
22585 => 'MTN',
22586 => 'MTN',
22587 => 'Orange',
22588 => 'Orange',
22589 => 'Orange',
22594 => 'MTN',
22595 => 'MTN',
22596 => 'MTN',
22597 => 'Orange',
22598 => 'Orange',
);
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/226.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
return array (
22601 => 'Onatel',
22602 => 'Onatel',
22606 => 'Orange',
22607 => 'Orange',
22651 => 'Onatel',
22652 => 'Onatel',
Expand Down
5 changes: 3 additions & 2 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/229.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
22967 => 'MTN',
22968 => 'Moov',
22969 => 'MTN',
22990 => 'Moov',
22991 => 'Moov',
22990 => 'MTN',
22991 => 'MTN',
22993 => 'BLK',
22994 => 'Moov',
22995 => 'Moov',
22996 => 'MTN',
22997 => 'MTN',
22998 => 'Moov',
22999 => 'Moov',
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/243.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
24380 => 'Orange',
24381 => 'Vodacom',
24382 => 'Vodacom',
24383 => 'Vodacom',
24384 => 'Orange',
24388 => 'Yozma Timeturns sprl -YTT',
24389 => 'Orange',
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/250.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
25072 => 'TIGO',
25073 => 'Airtel',
25078 => 'MTN',
25079 => 'MTN',
);
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/252.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
25267 => 'Nationlink',
25268 => 'Nationlink',
25269 => 'Nationlink',
25271 => 'Amtel',
25279 => 'Somtel',
25280 => 'Somali Networks',
25288 => 'Somali Networks',
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/256.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
25673 => 'Hamilton Telecom',
25674 => 'Sure Telecom',
25675 => 'Airtel',
25676 => 'MTN',
25677 => 'MTN',
25678 => 'MTN',
25679 => 'Africell',
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/262.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
26269361 => 'ZEOP Mobile',
26269362 => 'ZEOP Mobile',
26269363 => 'ZEOP Mobile',
26269364 => 'ZEOP Mobile',
26269366 => 'Orange',
26269370 => 'Only',
26269371 => 'Only',
Expand Down
5 changes: 5 additions & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/33.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@
3375758 => 'Euroinformation Telecom',
3375763 => 'Euroinformation Telecom',
3375767 => 'Euroinformation Telecom',
3375770 => 'SFR',
3375771 => 'SFR',
3375772 => 'SFR',
3375773 => 'SFR',
3375774 => 'SFR',
3375777 => 'Euroinformation Telecom',
3375779 => 'Halys',
3375787 => 'Euroinformation Telecom',
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/351.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

return array (
3511 => 'NOS',
351609 => 'NOS',
35163 => 'NOS',
35165 => 'NOS',
Expand Down
1 change: 1 addition & 0 deletions giggsey/libphonenumber-for-php/src/carrier/data/en/358.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@
3584579 => 'DNA',
358458 => 'Elisa',
35846 => 'Elisa',
35849 => 'Elisa',
35850 => 'Elisa',
);
Loading