diff options
Diffstat (limited to 'www/wiki/extensions/Translate/Message.php')
-rw-r--r-- | www/wiki/extensions/Translate/Message.php | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/www/wiki/extensions/Translate/Message.php b/www/wiki/extensions/Translate/Message.php index 3a5b18de..9bc0ba4b 100644 --- a/www/wiki/extensions/Translate/Message.php +++ b/www/wiki/extensions/Translate/Message.php @@ -5,31 +5,31 @@ * @file * @author Niklas Laxström * @copyright Copyright © 2008-2010, Niklas Laxström - * @license GPL-2.0+ + * @license GPL-2.0-or-later */ /** * Interface for message objects used by MessageCollection. */ abstract class TMessage { - /// \string Message display key. + /** @var string Message display key. */ protected $key; - /// \string Message definition. + /** @var string Message definition. */ protected $definition; - /// \string Committed in-file translation. + /** @var string Committed in-file translation. */ protected $infile; - /// \list{String} Message tags. - protected $tags = array(); - /// \array Message properties. - protected $props = array(); - /// \list{String} Message reviewers. - protected $reviewers = array(); + /** @var string[] Message tags. */ + protected $tags = []; + /** @var array Message properties. */ + protected $props = []; + /** @var string[] Message reviewers. */ + protected $reviewers = []; /** * Creates new message object. * - * @param $key string Unique key identifying this message. - * @param $definition string The authoritave definition of this message. + * @param string $key Unique key identifying this message. + * @param string $definition The authoritave definition of this message. */ public function __construct( $key, $definition ) { $this->key = $key; @@ -60,7 +60,7 @@ abstract class TMessage { /** * Set the committed translation. - * @param $text \string + * @param string $text */ public function setInfile( $text ) { $this->infile = $text; @@ -76,7 +76,7 @@ abstract class TMessage { /** * Add a tag for this message. - * @param $tag \string + * @param string $tag */ public function addTag( $tag ) { $this->tags[] = $tag; @@ -84,8 +84,8 @@ abstract class TMessage { /** * Check if this message has a given tag. - * @param $tag \string - * @return \bool + * @param string $tag + * @return bool */ public function hasTag( $tag ) { return in_array( $tag, $this->tags, true ); @@ -105,13 +105,13 @@ abstract class TMessage { public function appendProperty( $key, $value ) { if ( !isset( $this->props[$key] ) ) { - $this->props[$key] = array(); + $this->props[$key] = []; } $this->props[$key][] = $value; } public function getProperty( $key ) { - return isset( $this->props[$key] ) ? $this->props[$key] : null; + return $this->props[$key] ?? null; } /** @@ -131,10 +131,10 @@ abstract class TMessage { */ class ThinMessage extends TMessage { // This maps properties to fields in the database result row - protected static $propertyMap = array( + protected static $propertyMap = [ 'last-translator-text' => 'rev_user_text', 'last-translator-id' => 'rev_user', - ); + ]; /** * @var stdClass Database Result Row @@ -182,7 +182,7 @@ class ThinMessage extends TMessage { * Hence the name fat. Authors are not supported. */ class FatMessage extends TMessage { - /// \string Stored translation. + /** @var string Stored translation. */ protected $translation; /** |