@@ -318,6 +318,9 @@ |
||
318 | 318 | $this->compressAccordingToEnglishData($this->englishMaps[$countryCode], $mappings); |
319 | 319 | } |
320 | 320 | |
321 | + /** |
|
322 | + * @param string $textFile |
|
323 | + */ |
|
321 | 324 | private function getEnglishDataPath($textFile) |
322 | 325 | { |
323 | 326 | return "en" . DIRECTORY_SEPARATOR . substr($textFile, 3); |
@@ -121,7 +121,7 @@ |
||
121 | 121 | * Returns the customary display name in the given language for the given region. |
122 | 122 | * |
123 | 123 | * @param $regionCode |
124 | - * @param $locale |
|
124 | + * @param string $locale |
|
125 | 125 | * @return string |
126 | 126 | */ |
127 | 127 | protected function getRegionDisplayName($regionCode, $locale) |
@@ -42,6 +42,9 @@ |
||
42 | 42 | return ""; |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @param string $countryCallingCode |
|
47 | + */ |
|
45 | 48 | protected function inMap($language, $countryCallingCode) |
46 | 49 | { |
47 | 50 | return (array_key_exists($language, $this->map) && in_array($countryCallingCode, $this->map[$language])); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
84 | - * @param $xmlString |
|
84 | + * @param string $xmlString |
|
85 | 85 | * @return \DOMElement |
86 | 86 | */ |
87 | 87 | private function parseXMLString($xmlString) |
@@ -25,6 +25,9 @@ |
||
25 | 25 | $this->assertFalse($shortNumberInfo->isPossibleShortNumberForRegion($exampleNumber, 'NE')); |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $region |
|
30 | + */ |
|
28 | 31 | private function getExampleNumber($region) |
29 | 32 | { |
30 | 33 | $phoneUtil = PhoneNumberUtil::getInstance(); |
@@ -1876,7 +1876,7 @@ discard block |
||
1876 | 1876 | * Normalizes a string of characters representing a phone number. This converts wide-ascii and |
1877 | 1877 | * arabic-indic numerals to European numerals, and strips punctuation and alpha characters. |
1878 | 1878 | * |
1879 | - * @param $number string a string of characters representing a phone number |
|
1879 | + * @param string|null $number string a string of characters representing a phone number |
|
1880 | 1880 | * @return string the normalized string version of the phone number |
1881 | 1881 | */ |
1882 | 1882 | public static function normalizeDigitsOnly($number) |
@@ -2850,7 +2850,7 @@ discard block |
||
2850 | 2850 | * |
2851 | 2851 | * @param PhoneNumber $number the phone number to be formatted |
2852 | 2852 | * @param int $numberFormat the format the phone number should be formatted into |
2853 | - * @param array $userDefinedFormats formatting rules specified by clients |
|
2853 | + * @param NumberFormat[] $userDefinedFormats formatting rules specified by clients |
|
2854 | 2854 | * @return String the formatted phone number |
2855 | 2855 | */ |
2856 | 2856 | public function formatByPattern(PhoneNumber $number, $numberFormat, array $userDefinedFormats) |
@@ -3244,6 +3244,10 @@ discard block |
||
3244 | 3244 | $this->stringEndsWithString($secondNumberNationalNumber, $firstNumberNationalNumber); |
3245 | 3245 | } |
3246 | 3246 | |
3247 | + /** |
|
3248 | + * @param string $hayStack |
|
3249 | + * @param string $needle |
|
3250 | + */ |
|
3247 | 3251 | protected function stringEndsWithString($hayStack, $needle) |
3248 | 3252 | { |
3249 | 3253 | $revNeedle = strrev($needle); |
@@ -308,6 +308,9 @@ discard block |
||
308 | 308 | return $eligibleFormatMatcher->matches(); |
309 | 309 | } |
310 | 310 | |
311 | + /** |
|
312 | + * @param string $leadingDigits |
|
313 | + */ |
|
311 | 314 | private function narrowDownPossibleFormats($leadingDigits) |
312 | 315 | { |
313 | 316 | $indexOfLeadingDigitsPattern = mb_strlen($leadingDigits) - self::$minLeadingDigitsLength; |
@@ -567,6 +570,9 @@ discard block |
||
567 | 570 | return ($this->extractedNationalPrefix !== $this->removeNationalPrefixFromNationalNumber()); |
568 | 571 | } |
569 | 572 | |
573 | + /** |
|
574 | + * @param string $nextChar |
|
575 | + */ |
|
570 | 576 | private function isDigitOrLeadingPlusSign($nextChar) |
571 | 577 | { |
572 | 578 | $plusCharsMatcher = new Matcher(PhoneNumberUtil::$PLUS_CHARS_PATTERN, $nextChar); |
@@ -622,7 +628,7 @@ discard block |
||
622 | 628 | * Combines the national number with any prefix (IDD/+ and country code or national prefix) that |
623 | 629 | * was collected. A space will be inserted between them if the current formatting template |
624 | 630 | * indicates this to be suitable. |
625 | - * @param $nationalNumber |
|
631 | + * @param string $nationalNumber |
|
626 | 632 | * @return string |
627 | 633 | */ |
628 | 634 | private function appendNationalNumber($nationalNumber) |