diff options
Diffstat (limited to 'Echo/includes/ForeignNotifications.php')
-rw-r--r-- | Echo/includes/ForeignNotifications.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Echo/includes/ForeignNotifications.php b/Echo/includes/ForeignNotifications.php index f4299d95..301c09ab 100644 --- a/Echo/includes/ForeignNotifications.php +++ b/Echo/includes/ForeignNotifications.php @@ -3,7 +3,8 @@ /** * Caches the result of EchoUnreadWikis::getUnreadCounts() and interprets the results in various useful ways. * - * If the user has disabled cross-wiki notifications in their preferences (see {@see EchoForeignNotifications::isEnabledByUser}), this class + * If the user has disabled cross-wiki notifications in their preferences + * (see {@see EchoForeignNotifications::isEnabledByUser}), this class * won't do anything and will behave as if the user has no foreign notifications. For example, getCount() will * return 0. If you need to get foreign notification information for a user even though they may not have * enabled the preference, set $forceEnable=true in the constructor. @@ -71,7 +72,7 @@ class EchoForeignNotifications { if ( $section === EchoAttributeManager::ALL ) { $count = array_sum( $this->counts ); } else { - $count = isset( $this->counts[$section] ) ? $this->counts[$section] : 0; + $count = $this->counts[$section] ?? 0; } return MWEchoNotifUser::capNotificationCount( $count ); @@ -98,7 +99,7 @@ class EchoForeignNotifications { return $max; } - return isset( $this->timestamps[$section] ) ? $this->timestamps[$section] : false; + return $this->timestamps[$section] ?? false; } /** @@ -117,7 +118,7 @@ class EchoForeignNotifications { return array_unique( $all ); } - return isset( $this->wikis[$section] ) ? $this->wikis[$section] : []; + return $this->wikis[$section] ?? []; } public function getWikiTimestamp( $wiki, $section = EchoAttributeManager::ALL ) { @@ -136,7 +137,7 @@ class EchoForeignNotifications { } return $max; } - return isset( $this->wikiTimestamps[$wiki][$section] ) ? $this->wikiTimestamps[$wiki][$section] : false; + return $this->wikiTimestamps[$wiki][$section] ?? false; } protected function populate() { |