Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ parameters:
message: "#^Cannot cast mixed to string\\.$#"
count: 1
path: src/WikibaseExportExtension.php

-
message: "#^If condition is always true\\.$#"
count: 1
path: src/EntryPoints/SpecialWikibaseExport.php

-
message: "#^If condition is always true\\.$#"
count: 1
path: src/EntryPoints/SpecialWikibaseExportConfig.php
11 changes: 9 additions & 2 deletions src/EntryPoints/SpecialWikibaseExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,15 @@ public function getGroupName(): string {
return 'wikibase';
}

public function getDescription(): Message {
return $this->msg( 'special-wikibase-export' );
/**
* @return string|Message Returns string in MW < 1.41 and Message in MW >= 1.41
*/
public function getDescription() {
if ( version_compare( MW_VERSION, '1.41', '>=' ) ) {
return $this->msg( 'special-wikibase-export' );
} else {
return $this->msg( 'special-wikibase-export' )->escaped();
}
}

private function shouldShowConfigLink(): bool {
Expand Down
12 changes: 10 additions & 2 deletions src/EntryPoints/SpecialWikibaseExportConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace ProfessionalWiki\WikibaseExport\EntryPoints;

use Message;
use SpecialPage;
use Title;

Expand All @@ -27,8 +28,15 @@ public function getGroupName(): string {
return 'wikibase';
}

public function getDescription(): string {
return $this->msg( 'special-wikibase-export-config' )->escaped();
/**
* @return string|Message Returns string in MW < 1.41 and Message in MW >= 1.41
*/
public function getDescription() {
if ( version_compare( MW_VERSION, '1.41', '>=' ) ) {
return $this->msg( 'special-wikibase-export-config' );
} else {
return $this->msg( 'special-wikibase-export-config' )->escaped();
}
}

}
Loading