Skip to content

Commit cbfcfe4

Browse files
committed
made phpdoc types consistent with those defined in Hack
1 parent d6a6a3f commit cbfcfe4

File tree

13 files changed

+28
-28
lines changed

13 files changed

+28
-28
lines changed

Collator/Collator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static function create($locale)
9999
* Sort array maintaining index association
100100
*
101101
* @param array &$array Input array
102-
* @param integer $sortFlag Flags for sorting, can be one of the following:
102+
* @param int $sortFlag Flags for sorting, can be one of the following:
103103
* Collator::SORT_REGULAR - compare items normally (don't change types)
104104
* Collator::SORT_NUMERIC - compare items numerically
105105
* Collator::SORT_STRING - compare items as strings

DateFormatter/IntlDateFormatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public static function create($locale, $datetype, $timetype, $timezone = null, $
187187
/**
188188
* Format the date/time value (timestamp) as a string
189189
*
190-
* @param integer|\DateTime $timestamp The timestamp to format. \DateTime objects
190+
* @param int |\DateTime $timestamp The timestamp to format. \DateTime objects
191191
* are supported as of PHP 5.3.4.
192192
*
193193
* @return string|Boolean The formatted value or false if formatting failed.
@@ -489,7 +489,7 @@ public function setCalendar($calendar)
489489
* patterns, parsing as much as possible to obtain a value. Extra space, unrecognized tokens, or
490490
* invalid values ("February 30th") are not accepted.
491491
*
492-
* @param Boolean $lenient Sets whether the parser is lenient or not. Currently
492+
* @param bool $lenient Sets whether the parser is lenient or not. Currently
493493
* only false (strict) is supported.
494494
*
495495
* @return Boolean true on success or false on failure

Globals/IntlGlobals.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ abstract class IntlGlobals
6767
/**
6868
* Returns whether the error code indicates a failure
6969
*
70-
* @param integer $errorCode The error code returned by IntlGlobals::getErrorCode()
70+
* @param int $errorCode The error code returned by IntlGlobals::getErrorCode()
7171
*
7272
* @return Boolean
7373
*/
@@ -104,7 +104,7 @@ public static function getErrorMessage()
104104
/**
105105
* Returns the symbolic name for a given error code
106106
*
107-
* @param integer $code The error code returned by IntlGlobals::getErrorCode()
107+
* @param int $code The error code returned by IntlGlobals::getErrorCode()
108108
*
109109
* @return string
110110
*/
@@ -120,7 +120,7 @@ public static function getErrorName($code)
120120
/**
121121
* Sets the current error
122122
*
123-
* @param integer $code One of the error constants in this class
123+
* @param int $code One of the error constants in this class
124124
* @param string $message The ICU class error message
125125
*
126126
* @throws \InvalidArgumentException If the code is not one of the error constants in this class

Locale/Locale.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function composeLocale(array $subtags)
7676
*
7777
* @param string $langtag The language tag to check
7878
* @param string $locale The language range to check against
79-
* @param Boolean $canonicalize
79+
* @param bool $canonicalize
8080
*
8181
* @return string The corresponding locale code
8282
*
@@ -271,7 +271,7 @@ public static function getScript($locale)
271271
*
272272
* @param array $langtag A list of the language tags to compare to locale
273273
* @param string $locale The locale to use as the language range when matching
274-
* @param Boolean $canonicalize If true, the arguments will be converted to canonical form before matching
274+
* @param bool $canonicalize If true, the arguments will be converted to canonical form before matching
275275
* @param string $default The locale to use if no match is found
276276
*
277277
* @see http://www.php.net/manual/en/locale.lookup.php

NumberFormatter/NumberFormatter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ private function roundCurrency($value, $currency)
693693
/**
694694
* Rounds a value.
695695
*
696-
* @param integer|float $value The value to round
696+
* @param int |float $value The value to round
697697
* @param int $precision The number of decimal digits to round to
698698
*
699699
* @return integer|float The rounded value
@@ -711,7 +711,7 @@ private function round($value, $precision)
711711
/**
712712
* Formats a number.
713713
*
714-
* @param integer|float $value The numeric value to format
714+
* @param int |float $value The numeric value to format
715715
* @param int $precision The number of decimal digits to use
716716
*
717717
* @return string The formatted number
@@ -726,7 +726,7 @@ private function formatNumber($value, $precision)
726726
/**
727727
* Returns the precision value if the DECIMAL style is being used and the FRACTION_DIGITS attribute is unitialized.
728728
*
729-
* @param integer|float $value The value to get the precision from if the FRACTION_DIGITS attribute is unitialized
729+
* @param int |float $value The value to get the precision from if the FRACTION_DIGITS attribute is unitialized
730730
* @param int $precision The precision value to returns if the FRACTION_DIGITS attribute is initialized
731731
*
732732
* @return int The precision value

ResourceBundle/Reader/BufferedBundleReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BufferedBundleReader implements BundleReaderInterface
2929
* Buffers a given reader.
3030
*
3131
* @param BundleReaderInterface $reader The reader to buffer.
32-
* @param integer $bufferSize The number of entries to store
32+
* @param int $bufferSize The number of entries to store
3333
* in the buffer.
3434
*/
3535
public function __construct(BundleReaderInterface $reader, $bufferSize)

ResourceBundle/Reader/StructuredBundleReaderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ interface StructuredBundleReaderInterface extends BundleReaderInterface
3636
* @param string $path The path to the resource bundle.
3737
* @param string $locale The locale to read.
3838
* @param string[] $indices The indices to read from the bundle.
39-
* @param Boolean $fallback Whether to merge the value with the value from
39+
* @param bool $fallback Whether to merge the value with the value from
4040
* the fallback locale (e.g. "en" for "en_GB").
4141
* Only applicable if the result is multivalued
4242
* (i.e. array or \ArrayAccess) or cannot be found

ResourceBundle/Writer/TextBundleWriter.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ private function writeResourceBundle($file, $bundleName, $value)
5858
*
5959
* @param resource $file The file handle to write to.
6060
* @param mixed $value The value of the node.
61-
* @param integer $indentation The number of levels to indent.
62-
* @param Boolean $requireBraces Whether to require braces to be printed
61+
* @param int $indentation The number of levels to indent.
62+
* @param bool $requireBraces Whether to require braces to be printed
6363
* around the value.
6464
*
6565
* @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
@@ -103,7 +103,7 @@ private function writeResource($file, $value, $indentation, $requireBraces = tru
103103
* Writes an "integer" node.
104104
*
105105
* @param resource $file The file handle to write to.
106-
* @param integer $value The value of the node.
106+
* @param int $value The value of the node.
107107
*
108108
* @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
109109
*/
@@ -117,7 +117,7 @@ private function writeInteger($file, $value)
117117
*
118118
* @param resource $file The file handle to write to.
119119
* @param array $value The value of the node.
120-
* @param integer $indentation The number of levels to indent.
120+
* @param int $indentation The number of levels to indent.
121121
*
122122
* @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
123123
*/
@@ -137,7 +137,7 @@ private function writeIntVector($file, array $value, $indentation)
137137
*
138138
* @param resource $file The file handle to write to.
139139
* @param string $value The value of the node.
140-
* @param Boolean $requireBraces Whether to require braces to be printed
140+
* @param bool $requireBraces Whether to require braces to be printed
141141
* around the value.
142142
*
143143
* @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
@@ -158,7 +158,7 @@ private function writeString($file, $value, $requireBraces = true)
158158
*
159159
* @param resource $file The file handle to write to.
160160
* @param array $value The value of the node.
161-
* @param integer $indentation The number of levels to indent.
161+
* @param int $indentation The number of levels to indent.
162162
*
163163
* @see http://source.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt
164164
*/
@@ -182,7 +182,7 @@ private function writeArray($file, array $value, $indentation)
182182
*
183183
* @param resource $file The file handle to write to.
184184
* @param array $value The value of the node.
185-
* @param integer $indentation The number of levels to indent.
185+
* @param int $indentation The number of levels to indent.
186186
*/
187187
private function writeTable($file, array $value, $indentation)
188188
{

Resources/stubs/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @author Bernhard Schussek <bschussek@gmail.com>
2121
*
22-
* @param integer $errorCode The error code returned by intl_get_error_code().
22+
* @param int $errorCode The error code returned by intl_get_error_code().
2323
*
2424
* @return Boolean Whether the error code indicates an error.
2525
*
@@ -66,7 +66,7 @@ function intl_get_error_message()
6666
* Stub implementation for the {@link intl_error_name()} function of the intl
6767
* extension.
6868
*
69-
* @param integer $errorCode The error code.
69+
* @param int $errorCode The error code.
7070
*
7171
* @return string The name of the error code constant.
7272
*

Tests/DateFormatter/AbstractIntlDateFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ abstract protected function getIntlErrorMessage();
924924
abstract protected function getIntlErrorCode();
925925

926926
/**
927-
* @param integer $errorCode
927+
* @param int $errorCode
928928
*
929929
* @return Boolean
930930
*/

Tests/NumberFormatter/AbstractNumberFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ abstract protected function getIntlErrorMessage();
734734
abstract protected function getIntlErrorCode();
735735

736736
/**
737-
* @param integer $errorCode
737+
* @param int $errorCode
738738
*
739739
* @return Boolean
740740
*/

Util/IcuVersion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class IcuVersion
4646
* @param string $version1 A version string.
4747
* @param string $version2 A version string to compare.
4848
* @param string $operator The comparison operator.
49-
* @param integer|null $precision The number of components to compare. Pass
49+
* @param int |null $precision The number of components to compare. Pass
5050
* NULL to compare the versions unchanged.
5151
*
5252
* @return Boolean Whether the comparison succeeded.
@@ -81,7 +81,7 @@ public static function compare($version1, $version2, $operator, $precision = nul
8181
* // => '12.3'
8282
*
8383
* @param string $version An ICU version string.
84-
* @param integer|null $precision The number of components to include. Pass
84+
* @param int |null $precision The number of components to include. Pass
8585
* NULL to return the version unchanged.
8686
*
8787
* @return string|null The normalized ICU version or NULL if it couldn't be

Util/Version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Version
3636
* @param string $version1 A version string.
3737
* @param string $version2 A version string to compare.
3838
* @param string $operator The comparison operator.
39-
* @param integer|null $precision The number of components to compare. Pass
39+
* @param int |null $precision The number of components to compare. Pass
4040
* NULL to compare the versions unchanged.
4141
*
4242
* @return Boolean Whether the comparison succeeded.
@@ -64,7 +64,7 @@ public static function compare($version1, $version2, $operator, $precision = nul
6464
* // => '1.2'
6565
*
6666
* @param string $version A version string.
67-
* @param integer|null $precision The number of components to include. Pass
67+
* @param int |null $precision The number of components to include. Pass
6868
* NULL to return the version unchanged.
6969
*
7070
* @return string|null The normalized version or NULL if it couldn't be

0 commit comments

Comments
 (0)