Skip to content

Commit

Permalink
I18N: Improve docblocks after [57337].
Browse files Browse the repository at this point in the history
Props mukesh27.
See #59656.

git-svn-id: https://develop.svn.wordpress.org/trunk@57344 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
swissspidy committed Jan 24, 2024
1 parent 78ef4f7 commit 28fd787
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 110 deletions.
1 change: 0 additions & 1 deletion src/wp-includes/class-wp-textdomain-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public function get_language_files_from_path( $path ) {
* @type string $version The version of a theme, plugin, or core.
* }
* }
* @return void
*/
public function invalidate_mo_files_cache( $upgrader, $hook_extra ) {
if (
Expand Down
1 change: 0 additions & 1 deletion src/wp-includes/l10n/class-wp-translation-file.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ protected function import( WP_Translation_File $source ): bool {
*/
abstract protected function parse_file();


/**
* Exports translation contents as a string.
*
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/l10n/class-wp-translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public function __get( string $name ) {
*
* @since 6.5.0
*
* @param string $original Original string to translate from MO file. Might contain
* 0x04 as context separator or 0x00 as singular/plural separator.
* @param string $original Original string to translate from MO file. Might contain
* 0x04 as context separator or 0x00 as singular/plural separator.
* @param string $translations Translation strings from MO file.
* @return Translation_Entry Entry instance.
*/
Expand Down
31 changes: 0 additions & 31 deletions tests/phpunit/tests/l10n/wpTranslationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
* @group i18n
*/
class WP_Translation_Controller_Tests extends WP_UnitTestCase {
/**
* @return void
*/
public function tear_down() {
remove_all_filters( 'translation_file_format' );
unload_textdomain( 'wp-tests-domain' );
Expand All @@ -21,8 +18,6 @@ public function tear_down() {
* @covers WP_Translation_Controller::get_entries
* @covers WP_Translation_Controller::get_headers
* @covers WP_Translation_Controller::normalize_header
*
* @return void
*/
public function test_load_textdomain() {
global $l10n;
Expand Down Expand Up @@ -73,8 +68,6 @@ public function test_load_textdomain() {
* @covers WP_Translation_Controller::get_entries
* @covers WP_Translation_Controller::get_headers
* @covers WP_Translation_Controller::normalize_header
*
* @return void
*/
public function test_load_textdomain_existing_override() {
add_filter( 'override_load_textdomain', '__return_true' );
Expand All @@ -93,8 +86,6 @@ public function test_load_textdomain_existing_override() {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_php_files() {
$load_php_successful = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.l10n.php' );
Expand All @@ -107,8 +98,6 @@ public function test_load_textdomain_php_files() {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_prefers_php_files_by_default() {
$load_successful = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
Expand All @@ -131,8 +120,6 @@ public function test_load_textdomain_prefers_php_files_by_default() {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_reads_php_files_if_filtered_format_is_unsupported() {
add_filter(
Expand All @@ -158,8 +145,6 @@ static function () {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_existing_translation_is_kept() {
global $l10n;
Expand All @@ -183,8 +168,6 @@ public function test_load_textdomain_existing_translation_is_kept() {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_loads_existing_translation() {
global $l10n;
Expand All @@ -205,8 +188,6 @@ public function test_load_textdomain_loads_existing_translation() {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_loads_existing_translation_mo_files() {
global $l10n;
Expand Down Expand Up @@ -236,8 +217,6 @@ static function () {

/**
* @covers ::load_textdomain
*
* @return void
*/
public function test_load_textdomain_loads_existing_translation_php_files() {
global $l10n;
Expand Down Expand Up @@ -268,8 +247,6 @@ public function test_load_textdomain_loads_existing_translation_php_files() {
* @covers WP_Translation_Controller::get_entries
* @covers WP_Translation_Controller::get_headers
* @covers WP_Translation_Controller::normalize_header
*
* @return void
*/
public function test_unload_textdomain() {
global $l10n;
Expand All @@ -296,8 +273,6 @@ public function test_unload_textdomain() {

/**
* @covers ::unload_textdomain
*
* @return void
*/
public function test_unload_textdomain_existing_override() {
add_filter( 'override_unload_textdomain', '__return_true' );
Expand All @@ -323,8 +298,6 @@ public function test_unload_textdomain_existing_override() {
/**
* @covers ::unload_file
* @covers ::unload_textdomain
*
* @return void
*/
public function test_unload_non_existent_files_and_textdomains() {
$controller = new WP_Translation_Controller();
Expand All @@ -338,8 +311,6 @@ public function test_unload_non_existent_files_and_textdomains() {
/**
* @covers ::load_textdomain
* @covers ::unload_textdomain
*
* @return void
*/
public function test_switch_to_locale_translations_stay_loaded_default_textdomain() {
switch_to_locale( 'es_ES' );
Expand All @@ -363,8 +334,6 @@ public function test_switch_to_locale_translations_stay_loaded_default_textdomai
* @covers ::load_textdomain
* @covers ::unload_textdomain
* @covers ::change_locale
*
* @return void
*/
public function test_switch_to_locale_translations_stay_loaded_custom_textdomain() {
$this->assertSame( 'en_US', WP_Translation_Controller::instance()->get_locale() );
Expand Down
21 changes: 0 additions & 21 deletions tests/phpunit/tests/l10n/wpTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
* @group i18n
*/
class WP_Translations_Tests extends WP_UnitTestCase {
/**
* @return void
*/
public function tear_down() {
unload_textdomain( 'wp-tests-domain' );

Expand All @@ -19,8 +16,6 @@ public function tear_down() {
* @covers ::__construct
* @covers ::__get
* @covers ::make_entry
*
* @return void
*/
public function test_get_entries() {
global $l10n;
Expand Down Expand Up @@ -58,8 +53,6 @@ public function test_get_entries() {
/**
* @covers ::__get
* @covers ::make_entry
*
* @return void
*/
public function test_get_entries_plural() {
global $l10n;
Expand Down Expand Up @@ -99,8 +92,6 @@ public function test_get_entries_plural() {
/**
* @covers ::__get
* @covers ::make_entry
*
* @return void
*/
public function test_get_entries_context() {
global $l10n;
Expand Down Expand Up @@ -145,8 +136,6 @@ public function test_get_entries_context() {

/**
* @covers ::__get
*
* @return void
*/
public function test_get_headers() {
global $l10n;
Expand Down Expand Up @@ -174,8 +163,6 @@ public function test_get_headers() {

/**
* @covers ::__get
*
* @return void
*/
public function test_getter_unsupported_property() {
global $l10n;
Expand All @@ -191,8 +178,6 @@ public function test_getter_unsupported_property() {

/**
* @covers ::translate
*
* @return void
*/
public function test_translate() {
global $l10n;
Expand All @@ -214,8 +199,6 @@ public function test_translate() {

/**
* @covers ::translate_plural
*
* @return void
*/
public function test_translate_plural() {
global $l10n;
Expand All @@ -239,8 +222,6 @@ public function test_translate_plural() {

/**
* @covers ::translate_plural
*
* @return void
*/
public function test_translate_plural_missing() {
global $l10n;
Expand All @@ -265,8 +246,6 @@ public function test_translate_plural_missing() {
* @covers ::translate_plural
*
* @ticket 41257
*
* @return void
*/
public function test_translate_invalid_edge_cases() {
load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
Expand Down
Loading

0 comments on commit 28fd787

Please sign in to comment.