@@ -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) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | /** |
63 | 63 | * @internal |
64 | - * @param $regex |
|
64 | + * @param string $regex |
|
65 | 65 | * @param bool $removeWhitespace |
66 | 66 | * @return string |
67 | 67 | */ |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * @internal |
290 | 290 | * @param \DOMElement $element |
291 | 291 | * @param string $nationalPrefix |
292 | - * @return mixed|string |
|
292 | + * @return string |
|
293 | 293 | */ |
294 | 294 | public static function getDomesticCarrierCodeFormattingRuleFromElement(\DOMElement $element, $nationalPrefix) |
295 | 295 | { |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | } |
770 | 770 | |
771 | 771 | /** |
772 | - * @param $metadataCollection PhoneMetadata[] |
|
772 | + * @param PhoneMetadata[] $metadataCollection PhoneMetadata[] |
|
773 | 773 | * @return array |
774 | 774 | */ |
775 | 775 | public static function buildCountryCodeToRegionCodeMap($metadataCollection) |
@@ -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])); |