@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * Reads phone prefix data from the provides file path and invokes the given handler for each |
158 | 158 | * mapping read. |
159 | 159 | * |
160 | - * @param $filePath |
|
160 | + * @param string $filePath |
|
161 | 161 | * @param $handler |
162 | 162 | * @return array |
163 | 163 | * @throws \InvalidArgumentException |
@@ -204,6 +204,9 @@ discard block |
||
204 | 204 | return $this->getFilePath($language . DIRECTORY_SEPARATOR . $code . self::DATA_FILE_EXTENSION); |
205 | 205 | } |
206 | 206 | |
207 | + /** |
|
208 | + * @param string $fileName |
|
209 | + */ |
|
207 | 210 | private function getFilePath($fileName) |
208 | 211 | { |
209 | 212 | $path = $this->inputDir . $fileName; |
@@ -279,6 +282,9 @@ discard block |
||
279 | 282 | $this->compressAccordingToEnglishData($this->englishMaps[$countryCode], $mappings); |
280 | 283 | } |
281 | 284 | |
285 | + /** |
|
286 | + * @param string $textFile |
|
287 | + */ |
|
282 | 288 | private function getEnglishDataPath($textFile) |
283 | 289 | { |
284 | 290 | return "en" . DIRECTORY_SEPARATOR . substr($textFile, 3, 2) . self::DATA_FILE_EXTENSION; |
@@ -25,6 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | private $prefixFileReader = null; |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $phonePrefixDataDirectory |
|
30 | + */ |
|
28 | 31 | private function __construct($phonePrefixDataDirectory) |
29 | 32 | { |
30 | 33 | if(!extension_loaded('intl')) { |
@@ -104,7 +107,7 @@ discard block |
||
104 | 107 | * number is from. If it could be from many territories, nothing is returned. |
105 | 108 | * |
106 | 109 | * @param PhoneNumber $number |
107 | - * @param $locale |
|
110 | + * @param string $locale |
|
108 | 111 | * @return string |
109 | 112 | */ |
110 | 113 | private function getCountryNameForNumber(PhoneNumber $number, $locale) |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | * This version exists since calculating the phone number type is expensive; if we have already |
830 | 830 | * done this, we don't want to do it again. |
831 | 831 | * |
832 | - * @param PhoneNumber|int $phoneNumberObjOrType A PhoneNumber object, or a PhoneNumberType integer |
|
832 | + * @param integer $phoneNumberObjOrType A PhoneNumber object, or a PhoneNumberType integer |
|
833 | 833 | * @param int|null $countryCallingCode Used when passing a PhoneNumberType |
834 | 834 | * @return bool |
835 | 835 | */ |
@@ -1781,7 +1781,7 @@ discard block |
||
1781 | 1781 | * Normalizes a string of characters representing a phone number. This converts wide-ascii and |
1782 | 1782 | * arabic-indic numerals to European numerals, and strips punctuation and alpha characters. |
1783 | 1783 | * |
1784 | - * @param $number string a string of characters representing a phone number |
|
1784 | + * @param string $number string a string of characters representing a phone number |
|
1785 | 1785 | * @return string the normalized string version of the phone number |
1786 | 1786 | */ |
1787 | 1787 | public static function normalizeDigitsOnly($number) |
@@ -2743,7 +2743,7 @@ discard block |
||
2743 | 2743 | * |
2744 | 2744 | * @param PhoneNumber $number the phone number to be formatted |
2745 | 2745 | * @param int $numberFormat the format the phone number should be formatted into |
2746 | - * @param array $userDefinedFormats formatting rules specified by clients |
|
2746 | + * @param NumberFormat[] $userDefinedFormats formatting rules specified by clients |
|
2747 | 2747 | * @return String the formatted phone number |
2748 | 2748 | */ |
2749 | 2749 | public function formatByPattern(PhoneNumber $number, $numberFormat, array $userDefinedFormats) |
@@ -3136,6 +3136,10 @@ discard block |
||
3136 | 3136 | $this->stringEndsWithString($secondNumberNationalNumber, $firstNumberNationalNumber); |
3137 | 3137 | } |
3138 | 3138 | |
3139 | + /** |
|
3140 | + * @param string $hayStack |
|
3141 | + * @param string $needle |
|
3142 | + */ |
|
3139 | 3143 | protected function stringEndsWithString($hayStack, $needle) |
3140 | 3144 | { |
3141 | 3145 | $revNeedle = strrev($needle); |
@@ -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])); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | /** |
64 | 64 | * @internal |
65 | - * @param $regex |
|
65 | + * @param string $regex |
|
66 | 66 | * @param bool $removeWhitespace |
67 | 67 | * @return string |
68 | 68 | */ |
@@ -129,7 +129,6 @@ discard block |
||
129 | 129 | /** |
130 | 130 | * @param string $regionCode |
131 | 131 | * @param \DOMElement $element |
132 | - * @param string $liteBuild |
|
133 | 132 | * @param string $isShortNumberMetadata |
134 | 133 | * @param string $isAlternateFormatsMetadata |
135 | 134 | * @return PhoneMetadata |
@@ -323,7 +322,7 @@ discard block |
||
323 | 322 | * @internal |
324 | 323 | * @param \DOMElement $element |
325 | 324 | * @param string $nationalPrefix |
326 | - * @return mixed|string |
|
325 | + * @return string |
|
327 | 326 | */ |
328 | 327 | public static function getDomesticCarrierCodeFormattingRuleFromElement(\DOMElement $element, $nationalPrefix) |
329 | 328 | { |
@@ -796,7 +795,7 @@ discard block |
||
796 | 795 | } |
797 | 796 | |
798 | 797 | /** |
799 | - * @param $metadataCollection PhoneMetadata[] |
|
798 | + * @param PhoneMetadata[] $metadataCollection PhoneMetadata[] |
|
800 | 799 | * @return array |
801 | 800 | */ |
802 | 801 | public static function buildCountryCodeToRegionCodeMap($metadataCollection) |