Passed
Pull Request — master (#16)
by Jack
12:55
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   +36 added lines, -12 removed lines patch added patch discarded remove patch
@@ -206,18 +206,42 @@
 block discarded – undo
206 206
                 return $this;
207 207
         }
208 208
 
209
-        public function query(...$query)                   { return $this->context()->query(...$query); }
210
-        public function times($times, callable $fn = null) { return $this->context()->times($times, $fn); }
211
-        public function each(callable $fn)                 { return $this->context()->each($fn); }
212
-        public function filter(callable $fn)               { return $this->context()->filter($fn); }
213
-        public function setAttribute($name, $value = null) { $this->context()->setAttribute($name, $value); return $this; }
214
-        public function setText($text)                     { $this->context()->setText($text);    return $this; }
215
-        public function addText($text)                     { $this->context()->addText($text);    return $this; }
216
-        public function setCdata($text)                    { $this->context()->setCdata($text);   return $this; }
217
-        public function addCdata($text)                    { $this->context()->addCdata($text);   return $this; }
218
-        public function setComment($text)                  { $this->context()->setComment($text); return $this; }
219
-        public function addComment($text)                  { $this->context()->addComment($text); return $this; }
220
-        public function remove(...$query)                  { $this->context()->remove(...$query); return $this; }
209
+        public function query(...$query)
210
+        {
211
+return $this->context()->query(...$query); }
212
+        public function times($times, callable $fn = null)
213
+        {
214
+return $this->context()->times($times, $fn); }
215
+        public function each(callable $fn)
216
+        {
217
+return $this->context()->each($fn); }
218
+        public function filter(callable $fn)
219
+        {
220
+return $this->context()->filter($fn); }
221
+        public function setAttribute($name, $value = null)
222
+        {
223
+$this->context()->setAttribute($name, $value); return $this; }
224
+        public function setText($text)
225
+        {
226
+$this->context()->setText($text);    return $this; }
227
+        public function addText($text)
228
+        {
229
+$this->context()->addText($text);    return $this; }
230
+        public function setCdata($text)
231
+        {
232
+$this->context()->setCdata($text);   return $this; }
233
+        public function addCdata($text)
234
+        {
235
+$this->context()->addCdata($text);   return $this; }
236
+        public function setComment($text)
237
+        {
238
+$this->context()->setComment($text); return $this; }
239
+        public function addComment($text)
240
+        {
241
+$this->context()->addComment($text); return $this; }
242
+        public function remove(...$query)
243
+        {
244
+$this->context()->remove(...$query); return $this; }
221 245
 
222 246
         public function addChild($child, ...$optionals)
223 247
         {
Please login to merge, or discard this patch.