summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Translate/utils/MessageGroupCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Translate/utils/MessageGroupCache.php')
-rw-r--r--www/wiki/extensions/Translate/utils/MessageGroupCache.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/www/wiki/extensions/Translate/utils/MessageGroupCache.php b/www/wiki/extensions/Translate/utils/MessageGroupCache.php
index d3080e4d..f0b9c4bd 100644
--- a/www/wiki/extensions/Translate/utils/MessageGroupCache.php
+++ b/www/wiki/extensions/Translate/utils/MessageGroupCache.php
@@ -4,7 +4,7 @@
* @file
* @author Niklas Laxström
* @copyright Copyright © 2009-2013 Niklas Laxström
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
*/
/**
@@ -26,7 +26,7 @@ class MessageGroupCache {
protected $group;
/**
- * @var CdbReader
+ * @var \Cdb\Reader
*/
protected $cache;
@@ -116,7 +116,7 @@ class MessageGroupCache {
$this->close(); // Close the reader instance just to be sure
$messages = $this->group->load( $this->code );
- if ( $messages === array() ) {
+ if ( $messages === [] ) {
if ( $this->exists() ) {
// Delete stale cache files
unlink( $this->getCacheFileName() );
@@ -135,7 +135,7 @@ class MessageGroupCache {
$cache->set( $key, $value );
}
- $cache->set( '#created', $created ? $created : wfTimestamp() );
+ $cache->set( '#created', $created ?: wfTimestamp() );
$cache->set( '#updated', wfTimestamp() );
$cache->set( '#filehash', $hash );
$cache->set( '#msgcount', count( $messages ) );
@@ -149,7 +149,7 @@ class MessageGroupCache {
* Checks whether the cache still reflects the source file.
* It uses multiple conditions to speed up the checking from file
* modification timestamps to hashing.
- * @param int $reason
+ * @param int &$reason
* @return bool Whether the cache is up to date.
*/
public function isValid( &$reason ) {
@@ -230,7 +230,7 @@ class MessageGroupCache {
/**
* Open the cache for reading.
- * @return MessageGroupCache
+ * @return self
*/
protected function open() {
if ( $this->cache === null ) {