Merge "Add a few missing type declarations to properties and methods"

This commit is contained in:
jenkins-bot 2024-01-22 14:21:55 +00:00 committed by Gerrit Code Review
commit 73e1073108
4 changed files with 11 additions and 6 deletions

View file

@ -27,8 +27,7 @@ use MediaWiki\ResourceLoader as RL;
*/
class ResourceLoaderPygmentsModule extends RL\FileModule {
/** @var bool */
private $useBundled;
private bool $useBundled;
/** @inheritDoc */
public function __construct(

View file

@ -159,7 +159,10 @@ class SyntaxHighlightAce {
'YAML' => [ 'yaml' ],
];
public static function getPygmentsToAceMap() {
/**
* @return array<string,string>
*/
public static function getPygmentsToAceMap(): array {
$result = [];
foreach ( self::$aceLexers as $aceName => $pygmentsLexers ) {
foreach ( $pygmentsLexers as $lexer ) {

View file

@ -110,7 +110,10 @@ class SyntaxHighlightGeSHiCompat {
'apt_sources' => 'debsources',
];
public static function getGeSHiToPygmentsMap() {
/**
* @return array<string,string>
*/
public static function getGeSHiToPygmentsMap(): array {
return self::$compatibleLexers;
}
}

View file

@ -40,9 +40,9 @@ class VisualEditorConfig {
/**
* Get a full list of available languages
* @return array
* @return string[]
*/
private static function getPygmentsLanguages() {
private static function getPygmentsLanguages(): array {
return array_keys( require __DIR__ . '/../SyntaxHighlight.lexers.php' );
}
}