@@ -42,28 +42,28 @@ discard block |
||
42 | 42 | * @since 2.0.2 |
43 | 43 | */ |
44 | 44 | public static function initExtension() { |
45 | - $GLOBALS[ 'wgExtensionFunctions' ][] = function () { |
|
45 | + $GLOBALS[ 'wgExtensionFunctions' ][ ] = function() { |
|
46 | 46 | $parser = LingoParser::getInstance(); |
47 | 47 | |
48 | 48 | $backend = new $GLOBALS[ 'wgexLingoBackend' ](); |
49 | 49 | |
50 | 50 | $parser->setBackend( $backend ); |
51 | 51 | |
52 | - \Hooks::register( 'ContentAlterParserOutput', function () use ( $parser ){ |
|
52 | + \Hooks::register( 'ContentAlterParserOutput', function() use ( $parser ){ |
|
53 | 53 | $parser->parse( MediaWikiServices::getInstance()->getParser() ); |
54 | 54 | } ); |
55 | 55 | |
56 | - \Hooks::register( 'ApiMakeParserOptions', function ( \ParserOptions $popts, \Title $title, array $params ) use ( $parser ){ |
|
56 | + \Hooks::register( 'ApiMakeParserOptions', function( \ParserOptions $popts, \Title $title, array $params ) use ( $parser ){ |
|
57 | 57 | $parser->setApiParams( $params ); |
58 | 58 | } ); |
59 | 59 | |
60 | - \Hooks::register( 'GetDoubleUnderscoreIDs', function ( array &$doubleUnderscoreIDs ) { |
|
61 | - $doubleUnderscoreIDs[] = 'noglossary'; |
|
60 | + \Hooks::register( 'GetDoubleUnderscoreIDs', function( array &$doubleUnderscoreIDs ) { |
|
61 | + $doubleUnderscoreIDs[ ] = 'noglossary'; |
|
62 | 62 | return true; |
63 | 63 | } ); |
64 | 64 | |
65 | - \Hooks::register( 'ParserFirstCallInit', function ( \Parser $parser ) { |
|
66 | - $parser->setHook( 'noglossary', function ( $input, array $args, \Parser $parser, \PPFrame $frame ) { |
|
65 | + \Hooks::register( 'ParserFirstCallInit', function( \Parser $parser ) { |
|
66 | + $parser->setHook( 'noglossary', function( $input, array $args, \Parser $parser, \PPFrame $frame ) { |
|
67 | 67 | $output = $parser->recursiveTagParse( $input, $frame ); |
68 | 68 | return '<span class="noglossary">' . $output . '</span>'; |
69 | 69 | } ); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return true; |
72 | 72 | } ); |
73 | 73 | |
74 | - \Hooks::register( 'SpecialPageBeforeExecute', function ( \SpecialPage $specialPage, $subPage ) { |
|
74 | + \Hooks::register( 'SpecialPageBeforeExecute', function( \SpecialPage $specialPage, $subPage ) { |
|
75 | 75 | if ( $specialPage instanceof \SpecialVersion ) { |
76 | 76 | foreach ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ] as $index => $description ) { |
77 | 77 | if ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ][ $index ][ 'name' ] === 'Lingo' ) { |