@@ -245,6 +245,9 @@ discard block |
||
| 245 | 245 | } |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | + /** |
|
| 249 | + * @param string $nationalPrefix |
|
| 250 | + */ |
|
| 248 | 251 | private static function getDomesticCarrierCodeFormattingRuleFromElement(\DOMElement $element, $nationalPrefix) |
| 249 | 252 | { |
| 250 | 253 | $carrierCodeFormattingRule = $element->getAttribute(self::CARRIER_CODE_FORMATTING_RULE); |
@@ -431,7 +434,7 @@ discard block |
||
| 431 | 434 | } |
| 432 | 435 | |
| 433 | 436 | /** |
| 434 | - * @param $metadataCollection PhoneMetadata[] |
|
| 437 | + * @param PhoneMetadata[] $metadataCollection PhoneMetadata[] |
|
| 435 | 438 | * @return array |
| 436 | 439 | */ |
| 437 | 440 | public static function buildCountryCodeToRegionCodeMap($metadataCollection) |
@@ -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) |
@@ -1758,7 +1758,7 @@ discard block |
||
| 1758 | 1758 | * Normalizes a string of characters representing a phone number. This converts wide-ascii and |
| 1759 | 1759 | * arabic-indic numerals to European numerals, and strips punctuation and alpha characters. |
| 1760 | 1760 | * |
| 1761 | - * @param $number string a string of characters representing a phone number |
|
| 1761 | + * @param string $number string a string of characters representing a phone number |
|
| 1762 | 1762 | * @return string the normalized string version of the phone number |
| 1763 | 1763 | */ |
| 1764 | 1764 | public static function normalizeDigitsOnly($number) |
@@ -2660,7 +2660,7 @@ discard block |
||
| 2660 | 2660 | |
| 2661 | 2661 | /** |
| 2662 | 2662 | * Cleans all non-digit characters off of a phone number preserving a leading + sign if one is supplied. |
| 2663 | - * @param $phoneNumber String phone number that you want to clean |
|
| 2663 | + * @param string $phoneNumber String phone number that you want to clean |
|
| 2664 | 2664 | * @return string |
| 2665 | 2665 | */ |
| 2666 | 2666 | public function cleanPhoneNumber($phoneNumber) |
@@ -2721,7 +2721,7 @@ discard block |
||
| 2721 | 2721 | * |
| 2722 | 2722 | * @param PhoneNumber $number the phone number to be formatted |
| 2723 | 2723 | * @param int $numberFormat the format the phone number should be formatted into |
| 2724 | - * @param array $userDefinedFormats formatting rules specified by clients |
|
| 2724 | + * @param NumberFormat[] $userDefinedFormats formatting rules specified by clients |
|
| 2725 | 2725 | * @return String the formatted phone number |
| 2726 | 2726 | */ |
| 2727 | 2727 | public function formatByPattern(PhoneNumber $number, $numberFormat, array $userDefinedFormats) |
@@ -3114,6 +3114,10 @@ discard block |
||
| 3114 | 3114 | $this->stringEndsWithString($secondNumberNationalNumber, $firstNumberNationalNumber); |
| 3115 | 3115 | } |
| 3116 | 3116 | |
| 3117 | + /** |
|
| 3118 | + * @param string $hayStack |
|
| 3119 | + * @param string $needle |
|
| 3120 | + */ |
|
| 3117 | 3121 | protected function stringEndsWithString($hayStack, $needle) |
| 3118 | 3122 | { |
| 3119 | 3123 | $revNeedle = strrev($needle); |