Passed
Push — master ( eeab5f...5e4f21 )
by Daniele
02:41
created
source/FluidXml/FluidAliasesTrait.php 1 patch
Braces   +27 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,15 +4,33 @@
 block discarded – undo
4 4
 
5 5
 trait FluidAliasesTrait
6 6
 {
7
-        public function size()                           { return $this->length(); }
8
-        public function __invoke(...$query)              { return $this->query(...$query); }
9
-        public function add($child, ...$optionals)       { return $this->addChild($child, ...$optionals); }
10
-        public function prepend($sibling, ...$optionals) { return $this->prependSibling($sibling, ...$optionals); }
11
-        public function append($sibling, ...$optionals)  { return $this->appendSibling($sibling, ...$optionals); }
12
-        public function attr($name, $value = null)       { return $this->setAttribute($name, $value); }
13
-        public function text($text)                      { return $this->setText($text); }
14
-        public function cdata($text)                     { return $this->setCdata($text); }
15
-        public function comment($text)                   { return $this->setComment($text); }
7
+        public function size()
8
+        {
9
+return $this->length(); }
10
+        public function __invoke(...$query)
11
+        {
12
+return $this->query(...$query); }
13
+        public function add($child, ...$optionals)
14
+        {
15
+return $this->addChild($child, ...$optionals); }
16
+        public function prepend($sibling, ...$optionals)
17
+        {
18
+return $this->prependSibling($sibling, ...$optionals); }
19
+        public function append($sibling, ...$optionals)
20
+        {
21
+return $this->appendSibling($sibling, ...$optionals); }
22
+        public function attr($name, $value = null)
23
+        {
24
+return $this->setAttribute($name, $value); }
25
+        public function text($text)
26
+        {
27
+return $this->setText($text); }
28
+        public function cdata($text)
29
+        {
30
+return $this->setCdata($text); }
31
+        public function comment($text)
32
+        {
33
+return $this->setComment($text); }
16 34
         abstract public function length();
17 35
         abstract public function query(...$query);
18 36
         abstract public function addChild($child, ...$optionals);
Please login to merge, or discard this patch.
source/FluidXml/FluidXml.php 1 patch
Braces   +37 added lines, -13 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                         }
194 194
 
195 195
                         $namespaces[] = new FluidNamespace(...$args);
196
-                }  elseif (\is_array($arguments[0])) {
196
+                } elseif (\is_array($arguments[0])) {
197 197
                         $namespaces = $arguments[0];
198 198
                 } else {
199 199
                         $namespaces = $arguments;
@@ -207,18 +207,42 @@  discard block
 block discarded – undo
207 207
                 return $this;
208 208
         }
209 209
 
210
-        public function query(...$query)                   { return $this->context()->query(...$query); }
211
-        public function times($times, callable $fn = null) { return $this->context()->times($times, $fn); }
212
-        public function each(callable $fn)                 { return $this->context()->each($fn); }
213
-        public function filter(callable $fn)               { return $this->context()->filter($fn); }
214
-        public function setAttribute($name, $value = null) { $this->context()->setAttribute($name, $value); return $this; }
215
-        public function setText($text)                     { $this->context()->setText($text);    return $this; }
216
-        public function addText($text)                     { $this->context()->addText($text);    return $this; }
217
-        public function setCdata($text)                    { $this->context()->setCdata($text);   return $this; }
218
-        public function addCdata($text)                    { $this->context()->addCdata($text);   return $this; }
219
-        public function setComment($text)                  { $this->context()->setComment($text); return $this; }
220
-        public function addComment($text)                  { $this->context()->addComment($text); return $this; }
221
-        public function remove(...$query)                  { $this->context()->remove(...$query); return $this; }
210
+        public function query(...$query)
211
+        {
212
+return $this->context()->query(...$query); }
213
+        public function times($times, callable $fn = null)
214
+        {
215
+return $this->context()->times($times, $fn); }
216
+        public function each(callable $fn)
217
+        {
218
+return $this->context()->each($fn); }
219
+        public function filter(callable $fn)
220
+        {
221
+return $this->context()->filter($fn); }
222
+        public function setAttribute($name, $value = null)
223
+        {
224
+$this->context()->setAttribute($name, $value); return $this; }
225
+        public function setText($text)
226
+        {
227
+$this->context()->setText($text);    return $this; }
228
+        public function addText($text)
229
+        {
230
+$this->context()->addText($text);    return $this; }
231
+        public function setCdata($text)
232
+        {
233
+$this->context()->setCdata($text);   return $this; }
234
+        public function addCdata($text)
235
+        {
236
+$this->context()->addCdata($text);   return $this; }
237
+        public function setComment($text)
238
+        {
239
+$this->context()->setComment($text); return $this; }
240
+        public function addComment($text)
241
+        {
242
+$this->context()->addComment($text); return $this; }
243
+        public function remove(...$query)
244
+        {
245
+$this->context()->remove(...$query); return $this; }
222 246
 
223 247
         public function addChild($child, ...$optionals)
224 248
         {
Please login to merge, or discard this patch.