mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-27 15:50:37 +00:00
Merge "Add a few missing type declarations to properties and methods"
This commit is contained in:
commit
73e1073108
|
@ -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(
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue