@@ -41,7 +41,7 @@ |
||
41 | 41 | * Extensions\Lingo\LingoBackend constructor. |
42 | 42 | * @param LingoMessageLog|null $messages |
43 | 43 | */ |
44 | - public function __construct( LingoMessageLog &$messages = null ) { |
|
44 | + public function __construct( LingoMessageLog & $messages = null ) { |
|
45 | 45 | |
46 | 46 | if ( !$messages ) { |
47 | 47 | $this->mMessageLog = new LingoMessageLog(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * Extensions\Lingo\LingoParser constructor. |
58 | 58 | * @param LingoMessageLog|null $messages |
59 | 59 | */ |
60 | - public function __construct( LingoMessageLog &$messages = null ) { |
|
60 | + public function __construct( LingoMessageLog & $messages = null ) { |
|
61 | 61 | global $wgexLingoBackend; |
62 | 62 | |
63 | 63 | $this->mLingoBackend = new $wgexLingoBackend( $messages ); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @param Parser $parser |
68 | 68 | * @return string |
69 | 69 | */ |
70 | - private static function uniqPrefix( Parser &$parser ) { |
|
70 | + private static function uniqPrefix( Parser & $parser ) { |
|
71 | 71 | if ( defined( "Parser::MARKER_PREFIX" ) ) { |
72 | 72 | return Parser::MARKER_PREFIX; |
73 | 73 | } else { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @param string $text |
82 | 82 | * @return Boolean |
83 | 83 | */ |
84 | - public static function parse( Parser &$parser, &$text ) { |
|
84 | + public static function parse( Parser & $parser, &$text ) { |
|
85 | 85 | |
86 | 86 | if ( !self::$parserSingleton ) { |
87 | 87 | self::$parserSingleton = new LingoParser(); |
@@ -147,13 +147,13 @@ discard block |
||
147 | 147 | } else { |
148 | 148 | |
149 | 149 | wfDebug( "Cache miss: Lingo tree not found in cache.\n" ); |
150 | - $this->mLingoTree =& $this->buildLingo(); |
|
150 | + $this->mLingoTree = & $this->buildLingo(); |
|
151 | 151 | $cache->set( $cachekey, $this->mLingoTree ); |
152 | 152 | wfDebug( "Cached lingo tree.\n" ); |
153 | 153 | } |
154 | 154 | } else { |
155 | 155 | wfDebug( "Caching of lingo tree disabled.\n" ); |
156 | - $this->mLingoTree =& $this->buildLingo(); |
|
156 | + $this->mLingoTree = & $this->buildLingo(); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | const ELEMENT_LINK = 3; |
49 | 49 | const ELEMENT_STYLE = 4; |
50 | 50 | |
51 | - const ELEMENT_FIELDCOUNT = 5; // number of fields stored for each element; (last field's index) + 1 |
|
51 | + const ELEMENT_FIELDCOUNT = 5; // number of fields stored for each element; (last field's index) + 1 |
|
52 | 52 | |
53 | 53 | private $mFullDefinition = null; |
54 | 54 | private $mDefinitions = array(); |
@@ -75,14 +75,14 @@ discard block |
||
75 | 75 | * @param $definition |
76 | 76 | */ |
77 | 77 | public function addDefinition( &$definition ) { |
78 | - $this->mDefinitions[] = array_pad( $definition, self::ELEMENT_FIELDCOUNT, null ); |
|
78 | + $this->mDefinitions[ ] = array_pad( $definition, self::ELEMENT_FIELDCOUNT, null ); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
82 | 82 | * @param DOMDocument $doc |
83 | 83 | * @return DOMNode|DOMText |
84 | 84 | */ |
85 | - public function getFullDefinition( DOMDocument &$doc ) { |
|
85 | + public function getFullDefinition( DOMDocument & $doc ) { |
|
86 | 86 | |
87 | 87 | global $wgexLingoDisplayOnce; |
88 | 88 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * @param DOMDocument $doc |
169 | 169 | * @return DOMNode |
170 | 170 | */ |
171 | - private function getLinkTemplate( DOMDocument &$doc ) { |
|
171 | + private function getLinkTemplate( DOMDocument & $doc ) { |
|
172 | 172 | // create template if it does not yet exist |
173 | 173 | if ( !self::$mLinkTemplate || ( self::$mLinkTemplate->ownerDocument !== $doc ) ) { |
174 | 174 | global $wgScriptPath; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | * @return DOMElement |
190 | 190 | * @throws MWException |
191 | 191 | */ |
192 | - protected function getFullDefinitionAsLink( DOMDocument &$doc ) { |
|
192 | + protected function getFullDefinitionAsLink( DOMDocument & $doc ) { |
|
193 | 193 | |
194 | 194 | // create Title object for target page |
195 | 195 | $target = Title::newFromText( $this->mDefinitions[ 0 ][ self::ELEMENT_LINK ] ); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * @return string |
212 | 212 | * @throws MWException |
213 | 213 | */ |
214 | - protected function getFullDefinitionAsTooltip( DOMDocument &$doc ) { |
|
214 | + protected function getFullDefinitionAsTooltip( DOMDocument & $doc ) { |
|
215 | 215 | |
216 | 216 | // Wrap term and definition in <span> tags |
217 | 217 | $span = $doc->createElement( 'span' ); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * Extensions\Lingo\LingoBasicBackend constructor. |
49 | 49 | * @param LingoMessageLog|null $messages |
50 | 50 | */ |
51 | - public function __construct( LingoMessageLog &$messages = null ) { |
|
51 | + public function __construct( LingoMessageLog & $messages = null ) { |
|
52 | 52 | |
53 | 53 | global $wgexLingoPage, $wgRequest; |
54 | 54 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $term = null; |
127 | 127 | } |
128 | 128 | |
129 | - $definitions[] = trim( $chunks[ 1 ] ); |
|
129 | + $definitions[ ] = trim( $chunks[ 1 ] ); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | // found a new term? |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | if ( $term !== null ) { |
138 | 138 | foreach ( $definitions as $definition ) { |
139 | - $ret[] = array( |
|
139 | + $ret[ ] = array( |
|
140 | 140 | LingoElement::ELEMENT_TERM => $term, |
141 | 141 | LingoElement::ELEMENT_DEFINITION => $definition, |
142 | 142 | LingoElement::ELEMENT_LINK => null, |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * - extension description shown on Special:Version |
101 | 101 | */ |
102 | 102 | public static function initExtension() { |
103 | - MagicWord::$mDoubleUnderscoreIDs[] = 'noglossary'; |
|
103 | + MagicWord::$mDoubleUnderscoreIDs[ ] = 'noglossary'; |
|
104 | 104 | |
105 | 105 | foreach ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ] as $index => $description ) { |
106 | 106 | if ( $GLOBALS[ 'wgExtensionCredits' ][ 'parserhook' ][ $index ][ 'name' ] === 'Lingo' ) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param int $severity |
54 | 54 | */ |
55 | 55 | public function addMessage( $message, $severity = self::MESSAGE_NOTICE ) { |
56 | - $this->mMessages[] = array( $message, $severity ); |
|
56 | + $this->mMessages[ ] = array( $message, $severity ); |
|
57 | 57 | |
58 | 58 | // log errors and warnings in debug log |
59 | 59 | if ( $severity == self::MESSAGE_WARNING || |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @param $message |
68 | 68 | */ |
69 | 69 | public function addError( $message ) { |
70 | - $this->mMessages[] = array( $message, self::MESSAGE_ERROR ); |
|
70 | + $this->mMessages[ ] = array( $message, self::MESSAGE_ERROR ); |
|
71 | 71 | wfDebug( "Error: $message\n" ); |
72 | 72 | } |
73 | 73 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @param $message |
76 | 76 | */ |
77 | 77 | public function addWarning( $message ) { |
78 | - $this->mMessages[] = array( $message, self::MESSAGE_WARNING ); |
|
78 | + $this->mMessages[ ] = array( $message, self::MESSAGE_WARNING ); |
|
79 | 79 | wfDebug( "Warning: $message\n" ); |
80 | 80 | } |
81 | 81 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @param $message |
84 | 84 | */ |
85 | 85 | public function addNotice( $message ) { |
86 | - $this->mMessages[] = array( $message, self::MESSAGE_NOTICE ); |
|
86 | + $this->mMessages[ ] = array( $message, self::MESSAGE_NOTICE ); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |