@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | const ELEMENT_LINK = 3; |
48 | 48 | const ELEMENT_STYLE = 4; |
49 | 49 | |
50 | - const ELEMENT_FIELDCOUNT = 5; // number of fields stored for each element; (last field's index) + 1 |
|
50 | + const ELEMENT_FIELDCOUNT = 5; // number of fields stored for each element; (last field's index) + 1 |
|
51 | 51 | |
52 | 52 | const LINK_TEMPLATE_ID = 'LingoLink'; |
53 | 53 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @param $definition |
75 | 75 | */ |
76 | 76 | public function addDefinition( &$definition ) { |
77 | - $this->mDefinitions[] = array_pad( $definition, self::ELEMENT_FIELDCOUNT, null ); |
|
77 | + $this->mDefinitions[ ] = array_pad( $definition, self::ELEMENT_FIELDCOUNT, null ); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -168,19 +168,19 @@ discard block |
||
168 | 168 | $classes = array(); |
169 | 169 | |
170 | 170 | if ( $this->mDefinitions[ 0 ][ self::ELEMENT_STYLE ] !== null ) { |
171 | - $classes[] = $this->mDefinitions[ 0 ][ self::ELEMENT_STYLE ]; |
|
171 | + $classes[ ] = $this->mDefinitions[ 0 ][ self::ELEMENT_STYLE ]; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | if ( !$target->isKnown() ) { |
175 | - $classes[] = 'new'; |
|
175 | + $classes[ ] = 'new'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | if ( $target->isExternal() ) { |
179 | - $classes[] = 'extiw'; |
|
179 | + $classes[ ] = 'extiw'; |
|
180 | 180 | } |
181 | 181 | |
182 | - if ( count($classes) > 0 ) { |
|
183 | - $link->setAttribute( 'class', join(' ', $classes ) ); |
|
182 | + if ( count( $classes ) > 0 ) { |
|
183 | + $link->setAttribute( 'class', join( ' ', $classes ) ); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | return $link; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | protected function getFullDefinitionAsTooltip( StashingDOMDocument &$doc, callable $callback = null ) { |
214 | 214 | |
215 | 215 | if ( $callback === null ) { |
216 | - $callback = function( $text ){ return htmlentities( $text, ENT_COMPAT, 'UTF-8' ); }; |
|
216 | + $callback = function( $text ) { return htmlentities( $text, ENT_COMPAT, 'UTF-8' ); }; |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | // Wrap term and definition in <span> tags |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | if ( $mLinkTemplate === null ) { |
276 | 276 | |
277 | 277 | $mLinkTemplate = $doc->createElement( 'a' ); |
278 | - $mLinkTemplate->setAttribute( 'class', 'mw-lingo-tooltip-link'); |
|
278 | + $mLinkTemplate->setAttribute( 'class', 'mw-lingo-tooltip-link' ); |
|
279 | 279 | |
280 | 280 | $doc->stashSet( $mLinkTemplate, self::LINK_TEMPLATE_ID ); |
281 | 281 | } |