wp/wp-includes/pomo/entry.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-includes/pomo/entry.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/pomo/entry.php	Tue Sep 27 16:37:53 2022 +0200
@@ -9,14 +9,14 @@
 
 if ( ! class_exists( 'Translation_Entry', false ) ) :
 	/**
-	 * Translation_Entry class encapsulates a translatable string
+	 * Translation_Entry class encapsulates a translatable string.
 	 */
 	class Translation_Entry {
 
 		/**
-		 * Whether the entry contains a string and its plural form, default is false
+		 * Whether the entry contains a string and its plural form, default is false.
 		 *
-		 * @var boolean
+		 * @var bool
 		 */
 		public $is_plural = false;
 
@@ -30,17 +30,25 @@
 		public $flags               = array();
 
 		/**
-		 * @param array $args associative array, support following keys:
-		 *  - singular (string) -- the string to translate, if omitted and empty entry will be created
-		 *  - plural (string) -- the plural form of the string, setting this will set {@link $is_plural} to true
-		 *  - translations (array) -- translations of the string and possibly -- its plural forms
-		 *  - context (string) -- a string differentiating two equal strings used in different contexts
-		 *  - translator_comments (string) -- comments left by translators
-		 *  - extracted_comments (string) -- comments left by developers
-		 *  - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
-		 *  - flags (array) -- flags like php-format
+		 * @param array $args {
+		 *     Arguments array, supports the following keys:
+		 *
+		 *     @type string $singular            The string to translate, if omitted an
+		 *                                       empty entry will be created.
+		 *     @type string $plural              The plural form of the string, setting
+		 *                                       this will set `$is_plural` to true.
+		 *     @type array  $translations        Translations of the string and possibly
+		 *                                       its plural forms.
+		 *     @type string $context             A string differentiating two equal strings
+		 *                                       used in different contexts.
+		 *     @type string $translator_comments Comments left by translators.
+		 *     @type string $extracted_comments  Comments left by developers.
+		 *     @type array  $references          Places in the code this string is used, in
+		 *                                       relative_to_root_path/file.php:linenum form.
+		 *     @type array  $flags               Flags like php-format.
+		 * }
 		 */
-		function __construct( $args = array() ) {
+		public function __construct( $args = array() ) {
 			// If no singular -- empty object.
 			if ( ! isset( $args['singular'] ) ) {
 				return;
@@ -76,11 +84,11 @@
 		}
 
 		/**
-		 * Generates a unique key for this entry
+		 * Generates a unique key for this entry.
 		 *
-		 * @return string|bool the key or false if the entry is empty
+		 * @return string|false The key or false if the entry is empty.
 		 */
-		function key() {
+		public function key() {
 			if ( null === $this->singular || '' === $this->singular ) {
 				return false;
 			}
@@ -96,7 +104,7 @@
 		/**
 		 * @param object $other
 		 */
-		function merge_with( &$other ) {
+		public function merge_with( &$other ) {
 			$this->flags      = array_unique( array_merge( $this->flags, $other->flags ) );
 			$this->references = array_unique( array_merge( $this->references, $other->references ) );
 			if ( $this->extracted_comments != $other->extracted_comments ) {