Merge "RevisionStoreDbTestBase, remove redundant needsDB override"
[lhc/web/wiklou.git] / includes / logging / BlockLogFormatter.php
index 1ed18cd..3762d62 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
+ * @license GPL-2.0-or-later
  * @since 1.25
  */
 
-use MediaWiki\MediaWikiServices;
-
 /**
  * This class formats block log entries.
  *
@@ -99,7 +97,7 @@ class BlockLogFormatter extends LogFormatter {
 
        public function getActionLinks() {
                $subtype = $this->entry->getSubtype();
-               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+               $linkRenderer = $this->getLinkRenderer();
                if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
                        || !( $subtype === 'block' || $subtype === 'reblock' )
                        || !$this->context->getUser()->isAllowed( 'block' )
@@ -132,7 +130,7 @@ class BlockLogFormatter extends LogFormatter {
         * @param Language $lang
         * @return string
         */
-       public static function formatBlockFlags( $flags, $lang ) {
+       public static function formatBlockFlags( $flags, Language $lang ) {
                $flags = trim( $flags );
                if ( $flags === '' ) {
                        return ''; // nothing to do
@@ -155,7 +153,7 @@ class BlockLogFormatter extends LogFormatter {
         * @param Language $lang Language object to use
         * @return string
         */
-       public static function formatBlockFlag( $flag, $lang ) {
+       public static function formatBlockFlag( $flag, Language $lang ) {
                static $messages = [];
 
                if ( !isset( $messages[$flag] ) ) {