Completed
Push — master ( 041d61...29eed0 )
by
unknown
04:36
created
src/Element.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
 	/**
60 60
 	 * Lingo\Element constructor.
61
-	 * @param $term
62
-	 * @param $definition
61
+	 * @param string $term
62
+	 * @param string $definition
63 63
 	 */
64 64
 	public function __construct( &$term, &$definition = null ) {
65 65
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 	/**
154 154
 	 * @param $target
155
-	 * @param $link
155
+	 * @param DOMElement $link
156 156
 	 * @return mixed
157 157
 	 */
158 158
 	protected function &addClassAttributeToLink( $target, &$link ) {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 	/**
205 205
 	 * @param StashingDOMDocument $doc
206
-	 * @return string
206
+	 * @return DOMElement
207 207
 	 * @throws \MWException
208 208
 	 */
209 209
 	protected function getFullDefinitionAsTooltip( StashingDOMDocument &$doc ) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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,14 +74,14 @@  discard block
 block discarded – undo
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
 	/**
81 81
 	 * @param StashingDOMDocument $doc
82 82
 	 * @return DOMNode|DOMText
83 83
 	 */
84
-	public function getFullDefinition( StashingDOMDocument &$doc ) {
84
+	public function getFullDefinition( StashingDOMDocument & $doc ) {
85 85
 
86 86
 		global $wgexLingoDisplayOnce;
87 87
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	/**
99 99
 	 * @param StashingDOMDocument $doc
100 100
 	 */
101
-	private function buildFullDefinition( StashingDOMDocument &$doc ) {
101
+	private function buildFullDefinition( StashingDOMDocument & $doc ) {
102 102
 
103 103
 		// only create if not yet created
104 104
 		if ( $this->mFullDefinition === null || $this->mFullDefinition->ownerDocument !== $doc ) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	 * @return DOMElement
126 126
 	 * @throws \MWException
127 127
 	 */
128
-	protected function getFullDefinitionAsLink( StashingDOMDocument &$doc ) {
128
+	protected function getFullDefinitionAsLink( StashingDOMDocument & $doc ) {
129 129
 
130 130
 		// create Title object for target page
131 131
 		$target = Title::newFromText( $this->mDefinitions[ 0 ][ self::ELEMENT_LINK ] );
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 * @return string
207 207
 	 * @throws \MWException
208 208
 	 */
209
-	protected function getFullDefinitionAsTooltip( StashingDOMDocument &$doc ) {
209
+	protected function getFullDefinitionAsTooltip( StashingDOMDocument & $doc ) {
210 210
 
211 211
 		// Wrap term and definition in <span> tags
212 212
 		$span = $doc->createElement( 'span' );
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	 * @param StashingDOMDocument $doc
252 252
 	 * @return DOMNode
253 253
 	 */
254
-	private function getLinkTemplate( StashingDOMDocument &$doc ) {
254
+	private function getLinkTemplate( StashingDOMDocument & $doc ) {
255 255
 
256 256
 		$mLinkTemplate = $doc->stashGet( self::LINK_TEMPLATE_ID );
257 257
 
Please login to merge, or discard this patch.
src/LingoParser.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,6 @@
 block discarded – undo
28 28
  */
29 29
 namespace Lingo;
30 30
 
31
-use DOMDocument;
32
-use DOMXPath;
33 31
 use Parser;
34 32
 
35 33
 /**
Please login to merge, or discard this patch.
src/StashingDOMDocument.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 	 * @param $key
71 71
 	 * @return bool
72 72
 	 */
73
-	public function isStashed ( $key ) {
73
+	public function isStashed( $key ) {
74 74
 		return isset( $this->mStash[ $key ] );
75 75
 	}
76 76
 
Please login to merge, or discard this patch.