Skip to content

Commit 8eca69c

Browse files
Cleanup more @return annotations
1 parent d3c6389 commit 8eca69c

File tree

8 files changed

+33
-35
lines changed

8 files changed

+33
-35
lines changed

Countries.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class Countries extends ResourceBundle
3131
*
3232
* This list only contains "officially assigned ISO 3166-1 alpha-2" country codes.
3333
*
34-
* @return string[] an array of canonical ISO 3166 alpha-2 country codes
34+
* @return string[]
3535
*/
3636
public static function getCountryCodes(): array
3737
{
@@ -45,7 +45,7 @@ public static function getCountryCodes(): array
4545
*
4646
* This list only contains "officially assigned ISO 3166-1 alpha-3" country codes.
4747
*
48-
* @return string[] an array of canonical ISO 3166 alpha-3 country codes
48+
* @return string[]
4949
*/
5050
public static function getAlpha3Codes(): array
5151
{

Data/Generator/GeneratorConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getBundleWriters(): array
5858
* Returns the directory where the source versions of the resource bundles
5959
* are stored.
6060
*
61-
* @return string An absolute path to a directory
61+
* @return string
6262
*/
6363
public function getSourceDir(): string
6464
{
@@ -68,7 +68,7 @@ public function getSourceDir(): string
6868
/**
6969
* Returns the ICU version of the bundles being converted.
7070
*
71-
* @return string The ICU version string
71+
* @return string
7272
*/
7373
public function getIcuVersion(): string
7474
{

Intl.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ final class Intl
6767
/**
6868
* Returns whether the intl extension is installed.
6969
*
70-
* @return bool Returns true if the intl extension is installed, false otherwise
70+
* @return bool
7171
*/
7272
public static function isExtensionLoaded(): bool
7373
{
@@ -77,7 +77,7 @@ public static function isExtensionLoaded(): bool
7777
/**
7878
* Returns the version of the installed ICU library.
7979
*
80-
* @return string|null The ICU version or NULL if it could not be determined
80+
* @return string|null
8181
*/
8282
public static function getIcuVersion(): ?string
8383
{
@@ -107,7 +107,7 @@ public static function getIcuVersion(): ?string
107107
/**
108108
* Returns the version of the installed ICU data.
109109
*
110-
* @return string The version of the installed ICU data
110+
* @return string
111111
*/
112112
public static function getIcuDataVersion(): string
113113
{
@@ -121,7 +121,7 @@ public static function getIcuDataVersion(): string
121121
/**
122122
* Returns the ICU version that the stub classes mimic.
123123
*
124-
* @return string The ICU version of the stub classes
124+
* @return string
125125
*/
126126
public static function getIcuStubVersion(): string
127127
{
@@ -131,7 +131,7 @@ public static function getIcuStubVersion(): string
131131
/**
132132
* Returns the absolute path to the data directory.
133133
*
134-
* @return string The absolute path to the data directory
134+
* @return string
135135
*/
136136
public static function getDataDirectory(): string
137137
{

Locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static function setDefaultFallback(?string $locale)
4343
/**
4444
* Returns the default fallback locale.
4545
*
46-
* @return string|null The default fallback locale
46+
* @return string|null
4747
*
4848
* @see setDefaultFallback()
4949
* @see getFallback()

Locale/Locale.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ abstract class Locale
4848
*
4949
* @param string $header The string containing the "Accept-Language" header value
5050
*
51-
* @return string The corresponding locale code
51+
* @return string
5252
*
5353
* @see https://php.net/locale.acceptfromhttp
5454
*
@@ -93,7 +93,7 @@ public static function canonicalize(string $locale)
9393
*
9494
* @param array $subtags A keyed array where the keys identify the particular locale code subtag
9595
*
96-
* @return string The corresponding locale code
96+
* @return string
9797
*
9898
* @see https://php.net/locale.composelocale
9999
*
@@ -110,7 +110,7 @@ public static function composeLocale(array $subtags)
110110
* @param string $langtag The language tag to check
111111
* @param string $locale The language range to check against
112112
*
113-
* @return string The corresponding locale code
113+
* @return string
114114
*
115115
* @see https://php.net/locale.filtermatches
116116
*
@@ -126,7 +126,7 @@ public static function filterMatches(string $langtag, string $locale, bool $cano
126126
*
127127
* @param string $locale The locale to extract the variants from
128128
*
129-
* @return array The locale variants
129+
* @return array
130130
*
131131
* @see https://php.net/locale.getallvariants
132132
*
@@ -138,9 +138,9 @@ public static function getAllVariants(string $locale)
138138
}
139139

140140
/**
141-
* Returns the default locale.
141+
* Returns the default locale, which is always "en".
142142
*
143-
* @return string The default locale code. Always returns 'en'
143+
* @return string
144144
*
145145
* @see https://php.net/locale.getdefault
146146
*/
@@ -155,7 +155,7 @@ public static function getDefault()
155155
* @param string $locale The locale code to return the display language from
156156
* @param string $inLocale Optional format locale code to use to display the language name
157157
*
158-
* @return string The localized language display name
158+
* @return string
159159
*
160160
* @see https://php.net/locale.getdisplaylanguage
161161
*
@@ -172,7 +172,7 @@ public static function getDisplayLanguage(string $locale, string $inLocale = nul
172172
* @param string $locale The locale code to return the display locale name from
173173
* @param string $inLocale Optional format locale code to use to display the locale name
174174
*
175-
* @return string The localized locale display name
175+
* @return string
176176
*
177177
* @see https://php.net/locale.getdisplayname
178178
*
@@ -189,7 +189,7 @@ public static function getDisplayName(string $locale, string $inLocale = null)
189189
* @param string $locale The locale code to return the display region from
190190
* @param string $inLocale Optional format locale code to use to display the region name
191191
*
192-
* @return string The localized region display name
192+
* @return string
193193
*
194194
* @see https://php.net/locale.getdisplayregion
195195
*
@@ -206,7 +206,7 @@ public static function getDisplayRegion(string $locale, string $inLocale = null)
206206
* @param string $locale The locale code to return the display script from
207207
* @param string $inLocale Optional format locale code to use to display the script name
208208
*
209-
* @return string The localized script display name
209+
* @return string
210210
*
211211
* @see https://php.net/locale.getdisplayscript
212212
*
@@ -223,7 +223,7 @@ public static function getDisplayScript(string $locale, string $inLocale = null)
223223
* @param string $locale The locale code to return the display variant from
224224
* @param string $inLocale Optional format locale code to use to display the variant name
225225
*
226-
* @return string The localized variant display name
226+
* @return string
227227
*
228228
* @see https://php.net/locale.getdisplayvariant
229229
*
@@ -239,7 +239,7 @@ public static function getDisplayVariant(string $locale, string $inLocale = null
239239
*
240240
* @param string $locale The locale code to extract the keywords from
241241
*
242-
* @return array Associative array with the extracted variants
242+
* @return array
243243
*
244244
* @see https://php.net/locale.getkeywords
245245
*
@@ -255,7 +255,7 @@ public static function getKeywords(string $locale)
255255
*
256256
* @param string $locale The locale code to extract the language code from
257257
*
258-
* @return string|null The extracted language code or null in case of error
258+
* @return string|null
259259
*
260260
* @see https://php.net/locale.getprimarylanguage
261261
*
@@ -271,7 +271,7 @@ public static function getPrimaryLanguage(string $locale)
271271
*
272272
* @param string $locale The locale code to extract the region code from
273273
*
274-
* @return string|null The extracted region code or null if not present
274+
* @return string|null
275275
*
276276
* @see https://php.net/locale.getregion
277277
*
@@ -287,7 +287,7 @@ public static function getRegion(string $locale)
287287
*
288288
* @param string $locale The locale code to extract the script code from
289289
*
290-
* @return string|null The extracted script code or null if not present
290+
* @return string|null
291291
*
292292
* @see https://php.net/locale.getscript
293293
*
@@ -320,7 +320,7 @@ public static function lookup(array $langtag, string $locale, bool $canonicalize
320320
*
321321
* @param string $locale The locale code to extract the subtag array from
322322
*
323-
* @return array Associative array with the extracted subtags
323+
* @return array
324324
*
325325
* @see https://php.net/locale.parselocale
326326
*
@@ -334,7 +334,7 @@ public static function parseLocale(string $locale)
334334
/**
335335
* Not supported. Sets the default runtime locale.
336336
*
337-
* @return bool true on success or false on failure
337+
* @return bool
338338
*
339339
* @see https://php.net/locale.setdefault
340340
*

NumberFormatter/NumberFormatter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public static function create(?string $locale = 'en', int $style = null, string
308308
*
309309
* @param string $currency The 3-letter ISO 4217 currency code indicating the currency to use
310310
*
311-
* @return string The formatted currency value
311+
* @return string
312312
*
313313
* @see https://php.net/numberformatter.formatcurrency
314314
* @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes
@@ -345,7 +345,7 @@ public function formatCurrency(float $value, string $currency)
345345
* @param int $type Type of the formatting, one of the format type constants.
346346
* Only type NumberFormatter::TYPE_DEFAULT is currently supported.
347347
*
348-
* @return bool|string The formatted value or false on error
348+
* @return bool|string
349349
*
350350
* @see https://php.net/numberformatter.format
351351
*

Util/IcuVersion.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class IcuVersion
4646
* @param int|null $precision The number of components to compare. Pass
4747
* NULL to compare the versions unchanged.
4848
*
49-
* @return bool Whether the comparison succeeded
49+
* @return bool
5050
*
5151
* @see normalize()
5252
*/
@@ -80,8 +80,7 @@ public static function compare(string $version1, string $version2, string $opera
8080
* @param int|null $precision The number of components to include. Pass
8181
* NULL to return the version unchanged.
8282
*
83-
* @return string|null the normalized ICU version or NULL if it couldn't be
84-
* normalized
83+
* @return string|null
8584
*/
8685
public static function normalize(string $version, ?int $precision)
8786
{

Util/Version.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Version
3636
* @param int|null $precision The number of components to compare. Pass
3737
* NULL to compare the versions unchanged.
3838
*
39-
* @return bool Whether the comparison succeeded
39+
* @return bool
4040
*
4141
* @see normalize()
4242
*/
@@ -63,8 +63,7 @@ public static function compare(string $version1, string $version2, string $opera
6363
* @param int|null $precision The number of components to include. Pass
6464
* NULL to return the version unchanged.
6565
*
66-
* @return string|null the normalized version or NULL if it couldn't be
67-
* normalized
66+
* @return string|null
6867
*/
6968
public static function normalize(string $version, ?int $precision)
7069
{

0 commit comments

Comments
 (0)