@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function outerHtml() |
47 | 47 | { |
48 | - return $this->mapFirst(function (HtmlNode $node) { |
|
48 | + return $this->mapFirst(function(HtmlNode $node) { |
|
49 | 49 | return $node->outerHtml(); |
50 | 50 | }); |
51 | 51 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getHtml() |
76 | 76 | { |
77 | - return $this->mapFirst(function (HtmlNode $node) { |
|
77 | + return $this->mapFirst(function(HtmlNode $node) { |
|
78 | 78 | return $node->getHtml(); |
79 | 79 | }); |
80 | 80 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getText() |
124 | 124 | { |
125 | - return $this->mapFirst(function (HtmlNode $node) { |
|
125 | + return $this->mapFirst(function(HtmlNode $node) { |
|
126 | 126 | return $node->getText(); |
127 | 127 | }); |
128 | 128 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | public function setText(string $text) |
138 | 138 | { |
139 | - return $this->each(function (HtmlNode $node) use ($text) { |
|
139 | + return $this->each(function(HtmlNode $node) use ($text) { |
|
140 | 140 | $node->setText($text); |
141 | 141 | }); |
142 | 142 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public function empty() |
150 | 150 | { |
151 | - return $this->each(function (HtmlNode $node) { |
|
151 | + return $this->each(function(HtmlNode $node) { |
|
152 | 152 | $node->empty(); |
153 | 153 | }); |
154 | 154 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if (!is_null($selector)) { |
167 | 167 | $this->filter($selector)->remove(); |
168 | 168 | } else { |
169 | - $this->each(function (HtmlNode $node) { |
|
169 | + $this->each(function(HtmlNode $node) { |
|
170 | 170 | $node->remove(); |
171 | 171 | }); |
172 | 172 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function getVal() |
200 | 200 | { |
201 | - return $this->mapFirst(function (HtmlElement $node) { |
|
201 | + return $this->mapFirst(function(HtmlElement $node) { |
|
202 | 202 | return $node->getVal(); |
203 | 203 | }); |
204 | 204 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | */ |
213 | 213 | public function setVal(string $value) |
214 | 214 | { |
215 | - return $this->each(function (HtmlElement $node) use ($value) { |
|
215 | + return $this->each(function(HtmlElement $node) use ($value) { |
|
216 | 216 | $node->setVal($value); |
217 | 217 | }); |
218 | 218 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function addClass(string $className) |
228 | 228 | { |
229 | - return $this->each(function (HtmlElement $node) use ($className) { |
|
229 | + return $this->each(function(HtmlElement $node) use ($className) { |
|
230 | 230 | $node->addClass($className); |
231 | 231 | }); |
232 | 232 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | public function hasClass(string $className) |
242 | 242 | { |
243 | 243 | return $this->mapAnyTrue( |
244 | - function (HtmlElement $node) use ($className) { |
|
244 | + function(HtmlElement $node) use ($className) { |
|
245 | 245 | return $node->hasClass($className); |
246 | 246 | } |
247 | 247 | ); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | public function removeClass(?string $className = null) |
259 | 259 | { |
260 | - return $this->each(function (HtmlElement $node) use ($className) { |
|
260 | + return $this->each(function(HtmlElement $node) use ($className) { |
|
261 | 261 | $node->removeClass($className); |
262 | 262 | }); |
263 | 263 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | */ |
274 | 274 | public function toggleClass(string $className, ?bool $state = null) |
275 | 275 | { |
276 | - return $this->each(function (HtmlElement $node) use ($className, $state) { |
|
276 | + return $this->each(function(HtmlElement $node) use ($className, $state) { |
|
277 | 277 | $node->toggleClass($className, $state); |
278 | 278 | }); |
279 | 279 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | */ |
314 | 314 | public function getCss(string $name) |
315 | 315 | { |
316 | - return $this->mapFirst(function (HtmlElement $node) use ($name) { |
|
316 | + return $this->mapFirst(function(HtmlElement $node) use ($name) { |
|
317 | 317 | return $node->getCss($name); |
318 | 318 | }); |
319 | 319 | } |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | */ |
329 | 329 | public function setCss(string $name, ?string $value) |
330 | 330 | { |
331 | - return $this->each(function (HtmlElement $node) use ($name, $value) { |
|
331 | + return $this->each(function(HtmlElement $node) use ($name, $value) { |
|
332 | 332 | $node->setCss($name, $value); |
333 | 333 | }); |
334 | 334 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function removeCss(string $name) |
344 | 344 | { |
345 | - return $this->each(function (HtmlElement $node) use ($name) { |
|
345 | + return $this->each(function(HtmlElement $node) use ($name) { |
|
346 | 346 | $node->removeCss($name); |
347 | 347 | }); |
348 | 348 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function getAttr(string $name) |
46 | 46 | { |
47 | - return $this->mapFirst(function (HtmlElement $node) use ($name) { |
|
47 | + return $this->mapFirst(function(HtmlElement $node) use ($name) { |
|
48 | 48 | return $node->getAttr($name); |
49 | 49 | }); |
50 | 50 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function setAttr(string $name, string $value) |
61 | 61 | { |
62 | - return $this->each(function (HtmlElement $node) use ($name, $value) { |
|
62 | + return $this->each(function(HtmlElement $node) use ($name, $value) { |
|
63 | 63 | $node->setAttr($name, $value); |
64 | 64 | }); |
65 | 65 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function removeAttr(string $attributeName) |
75 | 75 | { |
76 | - return $this->each(function (HtmlElement $node) use ($attributeName) { |
|
76 | + return $this->each(function(HtmlElement $node) use ($attributeName) { |
|
77 | 77 | $node->removeAttr($attributeName); |
78 | 78 | }); |
79 | 79 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function removeAllAttrs($except = []) |
89 | 89 | { |
90 | - return $this->each(function (HtmlElement $node) use ($except) { |
|
90 | + return $this->each(function(HtmlElement $node) use ($except) { |
|
91 | 91 | $node->removeAllAttrs($except); |
92 | 92 | }); |
93 | 93 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | public function hasAttr(string $attributeName) |
103 | 103 | { |
104 | 104 | return $this->mapAnyTrue( |
105 | - function (HtmlElement $node) use ($attributeName) { |
|
105 | + function(HtmlElement $node) use ($attributeName) { |
|
106 | 106 | return $node->hasAttr($attributeName); |
107 | 107 | } |
108 | 108 | ); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | public function data($name, $value = null) |
149 | 149 | { |
150 | 150 | if (is_array($name)) { |
151 | - array_walk($name, function ($val, $key) { |
|
151 | + array_walk($name, function($val, $key) { |
|
152 | 152 | $this->data($key, $val); |
153 | 153 | }); |
154 | 154 |