@@ -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 | static private $mLinkTemplate = null; |
53 | 53 | private $mFullDefinition = null; |
54 | 54 | private $mDefinitions = array(); |
@@ -73,14 +73,14 @@ discard block |
||
73 | 73 | * @param $definition |
74 | 74 | */ |
75 | 75 | public function addDefinition( &$definition ) { |
76 | - $this->mDefinitions[] = array_pad( $definition, self::ELEMENT_FIELDCOUNT, null ); |
|
76 | + $this->mDefinitions[ ] = array_pad( $definition, self::ELEMENT_FIELDCOUNT, null ); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
80 | 80 | * @param DOMDocument $doc |
81 | 81 | * @return DOMNode|DOMText |
82 | 82 | */ |
83 | - public function getFullDefinition( DOMDocument &$doc ) { |
|
83 | + public function getFullDefinition( DOMDocument & $doc ) { |
|
84 | 84 | |
85 | 85 | global $wgexLingoDisplayOnce; |
86 | 86 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @param DOMDocument $doc |
99 | 99 | * @return DOMDocument |
100 | 100 | */ |
101 | - private function buildFullDefinition( DOMDocument &$doc ) { |
|
101 | + private function buildFullDefinition( DOMDocument & $doc ) { |
|
102 | 102 | |
103 | 103 | // only create if not yet created |
104 | 104 | if ( $this->mFullDefinition === null || $this->mFullDefinition->ownerDocument !== $doc ) { |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * @return DOMElement |
127 | 127 | * @throws MWException |
128 | 128 | */ |
129 | - protected function getFullDefinitionAsLink( DOMDocument &$doc ) { |
|
129 | + protected function getFullDefinitionAsLink( DOMDocument & $doc ) { |
|
130 | 130 | |
131 | 131 | // create Title object for target page |
132 | 132 | $target = Title::newFromText( $this->mDefinitions[ 0 ][ self::ELEMENT_LINK ] ); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * @return string |
197 | 197 | * @throws MWException |
198 | 198 | */ |
199 | - protected function getFullDefinitionAsTooltip( DOMDocument &$doc ) { |
|
199 | + protected function getFullDefinitionAsTooltip( DOMDocument & $doc ) { |
|
200 | 200 | |
201 | 201 | // Wrap term and definition in <span> tags |
202 | 202 | $span = $doc->createElement( 'span' ); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * @param DOMDocument $doc |
240 | 240 | * @return DOMNode |
241 | 241 | */ |
242 | - private function getLinkTemplate( DOMDocument &$doc ) { |
|
242 | + private function getLinkTemplate( DOMDocument & $doc ) { |
|
243 | 243 | // create template if it does not yet exist |
244 | 244 | if ( !self::$mLinkTemplate || ( self::$mLinkTemplate->ownerDocument !== $doc ) ) { |
245 | 245 | global $wgScriptPath; |