@@ -181,6 +181,9 @@ discard block |
||
181 | 181 | static::$initialized = true; |
182 | 182 | } |
183 | 183 | |
184 | + /** |
|
185 | + * @param integer $lower |
|
186 | + */ |
|
184 | 187 | private static function limit($lower, $upper) |
185 | 188 | { |
186 | 189 | if (($lower < 0) || ($upper <= 0) || ($upper < $lower)) { |
@@ -274,6 +277,9 @@ discard block |
||
274 | 277 | } |
275 | 278 | } |
276 | 279 | |
280 | + /** |
|
281 | + * @param integer $index |
|
282 | + */ |
|
277 | 283 | private function find($index) |
278 | 284 | { |
279 | 285 | $matcher = new Matcher(self::$pattern, $this->text); |
@@ -337,6 +343,9 @@ discard block |
||
337 | 343 | || preg_match('/\pM+/u', $letter); |
338 | 344 | } |
339 | 345 | |
346 | + /** |
|
347 | + * @param string $character |
|
348 | + */ |
|
340 | 349 | private static function isInvalidPunctuationSymbol($character) |
341 | 350 | { |
342 | 351 | return $character == '%' || preg_match('/\p{Sc}/u', $character); |
@@ -706,6 +715,9 @@ discard block |
||
706 | 715 | return true; |
707 | 716 | } |
708 | 717 | |
718 | + /** |
|
719 | + * @param string $candidate |
|
720 | + */ |
|
709 | 721 | public static function containsOnlyValidXChars(PhoneNumber $number, $candidate, PhoneNumberUtil $util) |
710 | 722 | { |
711 | 723 | // The characters 'x' and 'X' can be (1) a carrier code, in which case they always precede the |
@@ -794,7 +806,7 @@ discard block |
||
794 | 806 | private static $callingCodeToAlternateFormatsMap = array(); |
795 | 807 | |
796 | 808 | /** |
797 | - * @param $countryCallingCode |
|
809 | + * @param integer|null $countryCallingCode |
|
798 | 810 | * @return PhoneMetadata|null |
799 | 811 | */ |
800 | 812 | private static function getAlternateFormatsForCountry($countryCallingCode) |
@@ -860,7 +872,7 @@ discard block |
||
860 | 872 | /** |
861 | 873 | * Return the key of the current element |
862 | 874 | * @link http://php.net/manual/en/iterator.key.php |
863 | - * @return mixed scalar on success, or null on failure. |
|
875 | + * @return integer scalar on success, or null on failure. |
|
864 | 876 | * @since 5.0.0 |
865 | 877 | */ |
866 | 878 | public function key() |
@@ -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); |