Completed
Push — master ( 4299fd...109652 )
by Josh
01:30
created
src/Element.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -84,45 +84,45 @@  discard block
 block discarded – undo
84 84
 	}
85 85
 
86 86
 	/**
87
-	* Evaluate and return the result of a given XPath expression using this element as context node
88
-	*
89
-	* @param  string  $expr XPath expression
90
-	* @return mixed
91
-	*/
87
+	 * Evaluate and return the result of a given XPath expression using this element as context node
88
+	 *
89
+	 * @param  string  $expr XPath expression
90
+	 * @return mixed
91
+	 */
92 92
 	public function evaluate(string $expr)
93 93
 	{
94 94
 		return $this->ownerDocument->evaluate($expr, $this);
95 95
 	}
96 96
 
97 97
 	/**
98
-	* Evaluate and return the first element of a given XPath query using this element as context node
99
-	*
100
-	* @param  string       $expr XPath expression
101
-	* @return DOMNode|null
102
-	*/
98
+	 * Evaluate and return the first element of a given XPath query using this element as context node
99
+	 *
100
+	 * @param  string       $expr XPath expression
101
+	 * @return DOMNode|null
102
+	 */
103 103
 	public function firstOf(string $expr): ?DOMNode
104 104
 	{
105 105
 		return $this->ownerDocument->firstOf($expr, $this);
106 106
 	}
107 107
 
108 108
 	/**
109
-	* Evaluate and return the result of a given XPath query using this element as context node
110
-	*
111
-	* @param  string      $expr XPath expression
112
-	* @return DOMNodeList
113
-	*/
109
+	 * Evaluate and return the result of a given XPath query using this element as context node
110
+	 *
111
+	 * @param  string      $expr XPath expression
112
+	 * @return DOMNodeList
113
+	 */
114 114
 	public function query(string $expr): DOMNodeList
115 115
 	{
116 116
 		return $this->ownerDocument->query($expr, $this);
117 117
 	}
118 118
 
119 119
 	/**
120
-	* Insert given element relative to this element's position
121
-	*
122
-	* @param  string $where   One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
123
-	* @param  self   $element
124
-	* @return self
125
-	*/
120
+	 * Insert given element relative to this element's position
121
+	 *
122
+	 * @param  string $where   One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
123
+	 * @param  self   $element
124
+	 * @return self
125
+	 */
126 126
 	public function insertAdjacentElement(string $where, self $element): self
127 127
 	{
128 128
 		$this->insertAdjacentNode($where, $element);
@@ -131,24 +131,24 @@  discard block
 block discarded – undo
131 131
 	}
132 132
 
133 133
 	/**
134
-	* Insert given text relative to this element's position
135
-	*
136
-	* @param  string $where One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
137
-	* @param  string $text
138
-	* @return void
139
-	*/
134
+	 * Insert given text relative to this element's position
135
+	 *
136
+	 * @param  string $where One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
137
+	 * @param  string $text
138
+	 * @return void
139
+	 */
140 140
 	public function insertAdjacentText(string $where, string $text): void
141 141
 	{
142 142
 		$this->insertAdjacentXML($where, htmlspecialchars($text, ENT_XML1));
143 143
 	}
144 144
 
145 145
 	/**
146
-	* Insert given XML relative to this element's position
147
-	*
148
-	* @param  string $where One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
149
-	* @param  string $xml
150
-	* @return void
151
-	*/
146
+	 * Insert given XML relative to this element's position
147
+	 *
148
+	 * @param  string $where One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
149
+	 * @param  string $xml
150
+	 * @return void
151
+	 */
152 152
 	public function insertAdjacentXML(string $where, string $xml): void
153 153
 	{
154 154
 		$fragment = $this->ownerDocument->createDocumentFragment();
@@ -158,32 +158,32 @@  discard block
 block discarded – undo
158 158
 	}
159 159
 
160 160
 	/**
161
-	* Remove this element from the document
162
-	*
163
-	* @return self This element
164
-	*/
161
+	 * Remove this element from the document
162
+	 *
163
+	 * @return self This element
164
+	 */
165 165
 	public function remove(): self
166 166
 	{
167 167
 		return $this->parentNode->removeChild($this);
168 168
 	}
169 169
 
170 170
 	/**
171
-	* Replace this element with given element
172
-	*
173
-	* @param  self $element Replacement element
174
-	* @return self          This element
175
-	*/
171
+	 * Replace this element with given element
172
+	 *
173
+	 * @param  self $element Replacement element
174
+	 * @return self          This element
175
+	 */
176 176
 	public function replace(self $element): self
177 177
 	{
178 178
 		return $this->parentNode->replaceChild($element, $this);
179 179
 	}
180 180
 
181 181
 	/**
182
-	* Add namespace declarations that may be missing in given XML
183
-	*
184
-	* @param  string $xml Original XML
185
-	* @return string      Modified XML
186
-	*/
182
+	 * Add namespace declarations that may be missing in given XML
183
+	 *
184
+	 * @param  string $xml Original XML
185
+	 * @return string      Modified XML
186
+	 */
187 187
 	protected function addMissingNamespaceDeclarations(string $xml): string
188 188
 	{
189 189
 		preg_match_all('(xmlns:\\K[-\\w]++(?==))', $xml, $m);
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
 	}
209 209
 
210 210
 	/**
211
-	* Insert given node relative to this element's position
212
-	*
213
-	* @param  string  $where One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
214
-	* @param  DOMNode $node
215
-	* @return void
216
-	*/
211
+	 * Insert given node relative to this element's position
212
+	 *
213
+	 * @param  string  $where One of 'beforebegin', 'afterbegin', 'beforeend', 'afterend'
214
+	 * @param  DOMNode $node
215
+	 * @return void
216
+	 */
217 217
 	protected function insertAdjacentNode(string $where, DOMNode $node): void
218 218
 	{
219 219
 		$where = strtolower($where);
Please login to merge, or discard this patch.