Completed
Branch master (f81cc4)
by stéphane
07:03
created
sources/nodes/CompactSequence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function __construct(string $nodeString, int $line)
19 19
     {
20 20
         parent::__construct($nodeString, $line);
21
-        preg_match_all(Regex::SEQUENCE_VALUES, trim(substr(trim($nodeString), 1,-1)), $matches);
21
+        preg_match_all(Regex::SEQUENCE_VALUES, trim(substr(trim($nodeString), 1, -1)), $matches);
22 22
         foreach ($matches['item'] as $key => $item) {
23 23
             $i = new Item('', $line);
24 24
             $i->indent = null;
Please login to merge, or discard this patch.
sources/nodes/Scalar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
     public function getTargetOnLessIndent(NodeGeneric &$node):NodeGeneric
50 50
     {
51
-        if ($node instanceof Scalar || $node instanceof Blank ) {
51
+        if ($node instanceof Scalar || $node instanceof Blank) {
52 52
             return $this->getParent();
53 53
         } else {
54 54
             return $this->getParent($node->indent);
Please login to merge, or discard this patch.
sources/nodes/abstract/NodeGeneric.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function getParent(int $indent = null):NodeGeneric
73 73
     {
74
-        if (!is_int($indent)){
74
+        if (!is_int($indent)) {
75 75
             if ($this->_parent instanceof NodeGeneric) {
76 76
                 return $this->_parent;
77 77
             } else {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         if ($this->tag)        $props['tag']        = "($this->tag)";
246 246
         if ($this->value)      $props['value']      = $this->value;
247 247
         // $props['value'] = $this->value;
248
-        $props['raw']   = $this->raw;
248
+        $props['raw'] = $this->raw;
249 249
         if (!$this->_parent)  $props['parent'] = 'NO PARENT!!!';
250 250
         return $props;
251 251
     }
Please login to merge, or discard this patch.
sources/nodes/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         if ($value instanceof Key && $child instanceof Key) {
32 32
             if ($value->indent === $child->indent) {
33 33
                 return parent::add($child);
34
-            } elseif ($value->isAwaitingChild($child)){
34
+            } elseif ($value->isAwaitingChild($child)) {
35 35
                 return $value->add($child);
36 36
             } else {
37 37
                 // throw new \ParseError('key ('.$value->identifier.')@'.$value->line.' has already a value', 1);
Please login to merge, or discard this patch.
sources/nodes/Blank.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function add(NodeGeneric $child):NodeGeneric
14 14
     {
15
-        if($this->_parent instanceof NodeGeneric) {
15
+        if ($this->_parent instanceof NodeGeneric) {
16 16
             return $this->_parent->add($child);
17 17
         } else {
18 18
             throw new \ParseError(__METHOD__." no parent to add to", 1);
Please login to merge, or discard this patch.
sources/nodes/SetKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     public function build(&$parent = null)
30 30
     {
31 31
         $built = is_null($this->value) ? null : $this->value->build();
32
-        $stringKey = is_string($built) && Regex::isProperlyQuoted($built) ? trim($built, '\'" '): $built;
32
+        $stringKey = is_string($built) && Regex::isProperlyQuoted($built) ? trim($built, '\'" ') : $built;
33 33
         $key = json_encode($stringKey, JSON_PARTIAL_OUTPUT_ON_ERROR|JSON_UNESCAPED_SLASHES);
34 34
         if (empty($key)) throw new \Exception("Cant serialize complex key: ".var_export($this->value, true));
35 35
         $parent->{trim($key, '\'" ')} = null;
Please login to merge, or discard this patch.
sources/nodes/LiteralFolded.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@
 block discarded – undo
31 31
             $result = $this->getChildValue($first, $indent);
32 32
             foreach ($list as $child) {
33 33
                 $separator = ($result && $result[-1] === "\n") ? '' : $refSeparator;
34
-                if($child->indent > $indent || $child instanceof Blank) {
34
+                if ($child->indent > $indent || $child instanceof Blank) {
35 35
                     $separator = "\n";
36 36
                 }
37
-                $result .= $separator .$this->getChildValue($child, $indent);
37
+                $result .= $separator.$this->getChildValue($child, $indent);
38 38
             }
39 39
         }
40 40
         return $result;
Please login to merge, or discard this patch.
sources/nodes/Quoted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 {
13 13
     public function build(&$parent = null)
14 14
     {
15
-        return substr(trim($this->raw), 1,-1);
15
+        return substr(trim($this->raw), 1, -1);
16 16
     }
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
sources/tag/CoreSchema.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             foreach ($node as $key => $child) {
68 68
                 $list[] = $this->str($child);
69 69
             }
70
-            return new Nodes\Scalar(implode('',$list), 0);
70
+            return new Nodes\Scalar(implode('', $list), 0);
71 71
         }
72 72
     }
73 73
 
Please login to merge, or discard this patch.