Skip to content

Commit 28fd787

Browse files
committed
I18N: Improve docblocks after [57337].
Props mukesh27. See #59656. git-svn-id: https://develop.svn.wordpress.org/trunk@57344 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 78ef4f7 commit 28fd787

6 files changed

Lines changed: 2 additions & 110 deletions

File tree

src/wp-includes/class-wp-textdomain-registry.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public function get_language_files_from_path( $path ) {
225225
* @type string $version The version of a theme, plugin, or core.
226226
* }
227227
* }
228-
* @return void
229228
*/
230229
public function invalidate_mo_files_cache( $upgrader, $hook_extra ) {
231230
if (

src/wp-includes/l10n/class-wp-translation-file.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ protected function import( WP_Translation_File $source ): bool {
284284
*/
285285
abstract protected function parse_file();
286286

287-
288287
/**
289288
* Exports translation contents as a string.
290289
*

src/wp-includes/l10n/class-wp-translations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public function __get( string $name ) {
8080
*
8181
* @since 6.5.0
8282
*
83-
* @param string $original Original string to translate from MO file. Might contain
84-
* 0x04 as context separator or 0x00 as singular/plural separator.
83+
* @param string $original Original string to translate from MO file. Might contain
84+
* 0x04 as context separator or 0x00 as singular/plural separator.
8585
* @param string $translations Translation strings from MO file.
8686
* @return Translation_Entry Entry instance.
8787
*/

tests/phpunit/tests/l10n/wpTranslationController.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* @group i18n
66
*/
77
class WP_Translation_Controller_Tests extends WP_UnitTestCase {
8-
/**
9-
* @return void
10-
*/
118
public function tear_down() {
129
remove_all_filters( 'translation_file_format' );
1310
unload_textdomain( 'wp-tests-domain' );
@@ -21,8 +18,6 @@ public function tear_down() {
2118
* @covers WP_Translation_Controller::get_entries
2219
* @covers WP_Translation_Controller::get_headers
2320
* @covers WP_Translation_Controller::normalize_header
24-
*
25-
* @return void
2621
*/
2722
public function test_load_textdomain() {
2823
global $l10n;
@@ -73,8 +68,6 @@ public function test_load_textdomain() {
7368
* @covers WP_Translation_Controller::get_entries
7469
* @covers WP_Translation_Controller::get_headers
7570
* @covers WP_Translation_Controller::normalize_header
76-
*
77-
* @return void
7871
*/
7972
public function test_load_textdomain_existing_override() {
8073
add_filter( 'override_load_textdomain', '__return_true' );
@@ -93,8 +86,6 @@ public function test_load_textdomain_existing_override() {
9386

9487
/**
9588
* @covers ::load_textdomain
96-
*
97-
* @return void
9889
*/
9990
public function test_load_textdomain_php_files() {
10091
$load_php_successful = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.l10n.php' );
@@ -107,8 +98,6 @@ public function test_load_textdomain_php_files() {
10798

10899
/**
109100
* @covers ::load_textdomain
110-
*
111-
* @return void
112101
*/
113102
public function test_load_textdomain_prefers_php_files_by_default() {
114103
$load_successful = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
@@ -131,8 +120,6 @@ public function test_load_textdomain_prefers_php_files_by_default() {
131120

132121
/**
133122
* @covers ::load_textdomain
134-
*
135-
* @return void
136123
*/
137124
public function test_load_textdomain_reads_php_files_if_filtered_format_is_unsupported() {
138125
add_filter(
@@ -158,8 +145,6 @@ static function () {
158145

159146
/**
160147
* @covers ::load_textdomain
161-
*
162-
* @return void
163148
*/
164149
public function test_load_textdomain_existing_translation_is_kept() {
165150
global $l10n;
@@ -183,8 +168,6 @@ public function test_load_textdomain_existing_translation_is_kept() {
183168

184169
/**
185170
* @covers ::load_textdomain
186-
*
187-
* @return void
188171
*/
189172
public function test_load_textdomain_loads_existing_translation() {
190173
global $l10n;
@@ -205,8 +188,6 @@ public function test_load_textdomain_loads_existing_translation() {
205188

206189
/**
207190
* @covers ::load_textdomain
208-
*
209-
* @return void
210191
*/
211192
public function test_load_textdomain_loads_existing_translation_mo_files() {
212193
global $l10n;
@@ -236,8 +217,6 @@ static function () {
236217

237218
/**
238219
* @covers ::load_textdomain
239-
*
240-
* @return void
241220
*/
242221
public function test_load_textdomain_loads_existing_translation_php_files() {
243222
global $l10n;
@@ -268,8 +247,6 @@ public function test_load_textdomain_loads_existing_translation_php_files() {
268247
* @covers WP_Translation_Controller::get_entries
269248
* @covers WP_Translation_Controller::get_headers
270249
* @covers WP_Translation_Controller::normalize_header
271-
*
272-
* @return void
273250
*/
274251
public function test_unload_textdomain() {
275252
global $l10n;
@@ -296,8 +273,6 @@ public function test_unload_textdomain() {
296273

297274
/**
298275
* @covers ::unload_textdomain
299-
*
300-
* @return void
301276
*/
302277
public function test_unload_textdomain_existing_override() {
303278
add_filter( 'override_unload_textdomain', '__return_true' );
@@ -323,8 +298,6 @@ public function test_unload_textdomain_existing_override() {
323298
/**
324299
* @covers ::unload_file
325300
* @covers ::unload_textdomain
326-
*
327-
* @return void
328301
*/
329302
public function test_unload_non_existent_files_and_textdomains() {
330303
$controller = new WP_Translation_Controller();
@@ -338,8 +311,6 @@ public function test_unload_non_existent_files_and_textdomains() {
338311
/**
339312
* @covers ::load_textdomain
340313
* @covers ::unload_textdomain
341-
*
342-
* @return void
343314
*/
344315
public function test_switch_to_locale_translations_stay_loaded_default_textdomain() {
345316
switch_to_locale( 'es_ES' );
@@ -363,8 +334,6 @@ public function test_switch_to_locale_translations_stay_loaded_default_textdomai
363334
* @covers ::load_textdomain
364335
* @covers ::unload_textdomain
365336
* @covers ::change_locale
366-
*
367-
* @return void
368337
*/
369338
public function test_switch_to_locale_translations_stay_loaded_custom_textdomain() {
370339
$this->assertSame( 'en_US', WP_Translation_Controller::instance()->get_locale() );

tests/phpunit/tests/l10n/wpTranslations.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* @group i18n
77
*/
88
class WP_Translations_Tests extends WP_UnitTestCase {
9-
/**
10-
* @return void
11-
*/
129
public function tear_down() {
1310
unload_textdomain( 'wp-tests-domain' );
1411

@@ -19,8 +16,6 @@ public function tear_down() {
1916
* @covers ::__construct
2017
* @covers ::__get
2118
* @covers ::make_entry
22-
*
23-
* @return void
2419
*/
2520
public function test_get_entries() {
2621
global $l10n;
@@ -58,8 +53,6 @@ public function test_get_entries() {
5853
/**
5954
* @covers ::__get
6055
* @covers ::make_entry
61-
*
62-
* @return void
6356
*/
6457
public function test_get_entries_plural() {
6558
global $l10n;
@@ -99,8 +92,6 @@ public function test_get_entries_plural() {
9992
/**
10093
* @covers ::__get
10194
* @covers ::make_entry
102-
*
103-
* @return void
10495
*/
10596
public function test_get_entries_context() {
10697
global $l10n;
@@ -145,8 +136,6 @@ public function test_get_entries_context() {
145136

146137
/**
147138
* @covers ::__get
148-
*
149-
* @return void
150139
*/
151140
public function test_get_headers() {
152141
global $l10n;
@@ -174,8 +163,6 @@ public function test_get_headers() {
174163

175164
/**
176165
* @covers ::__get
177-
*
178-
* @return void
179166
*/
180167
public function test_getter_unsupported_property() {
181168
global $l10n;
@@ -191,8 +178,6 @@ public function test_getter_unsupported_property() {
191178

192179
/**
193180
* @covers ::translate
194-
*
195-
* @return void
196181
*/
197182
public function test_translate() {
198183
global $l10n;
@@ -214,8 +199,6 @@ public function test_translate() {
214199

215200
/**
216201
* @covers ::translate_plural
217-
*
218-
* @return void
219202
*/
220203
public function test_translate_plural() {
221204
global $l10n;
@@ -239,8 +222,6 @@ public function test_translate_plural() {
239222

240223
/**
241224
* @covers ::translate_plural
242-
*
243-
* @return void
244225
*/
245226
public function test_translate_plural_missing() {
246227
global $l10n;
@@ -265,8 +246,6 @@ public function test_translate_plural_missing() {
265246
* @covers ::translate_plural
266247
*
267248
* @ticket 41257
268-
*
269-
* @return void
270249
*/
271250
public function test_translate_invalid_edge_cases() {
272251
load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );

0 commit comments

Comments
 (0)