@@ -13,7 +13,7 @@ |
||
13 | 13 | public function __construct(string $nodeString, int $line) |
14 | 14 | { |
15 | 15 | parent::__construct($nodeString, $line); |
16 | - preg_match_all(Regex::MAPPING_VALUES, trim(substr(trim($nodeString), 1,-1)), $matches); |
|
16 | + preg_match_all(Regex::MAPPING_VALUES, trim(substr(trim($nodeString), 1, -1)), $matches); |
|
17 | 17 | foreach ($matches['k'] as $index => $property) { |
18 | 18 | $pair = $property.': '.trim($matches['v'][$index]); |
19 | 19 | $child = NodeFactory::get($pair, $line); |
@@ -25,7 +25,9 @@ |
||
25 | 25 | |
26 | 26 | public function add(Node $child):Node |
27 | 27 | { |
28 | - if (is_null($this->value)) $this->value = new NodeList(); |
|
28 | + if (is_null($this->value)) { |
|
29 | + $this->value = new NodeList(); |
|
30 | + } |
|
29 | 31 | $candidate = $child; |
30 | 32 | if (!Yaml::isOneOf($child, ['NodeScalar', 'NodeBlank', 'NodeComment', 'NodeQuoted'])) { |
31 | 33 | $candidate = new NodeScalar((string) $child->raw, $child->line); |
@@ -107,7 +107,9 @@ |
||
107 | 107 | { |
108 | 108 | foreach ($comparison as $className) { |
109 | 109 | $fqn = __NAMESPACE__."\\Yaml\\$className"; |
110 | - if ($subject instanceof $fqn) return true; |
|
110 | + if ($subject instanceof $fqn) { |
|
111 | + return true; |
|
112 | + } |
|
111 | 113 | } |
112 | 114 | return false; |
113 | 115 | } |