@@ -15,12 +15,12 @@ |
||
15 | 15 | private const NO_NAME = '%s Error: a tag MUST have a name'; |
16 | 16 | private const WRONG_VALUE = "Error : cannot transform tag '%s' for type '%s'"; |
17 | 17 | private const LEGACY_TAGS_HANDLERS = ['!!str' => 'strHandler', |
18 | - '!!binary' => 'binaryHandler', |
|
19 | - '!set' => 'setHandler', |
|
20 | - '!!omap' => 'omapHandler', |
|
21 | - '!php/object' => 'symfonyPHPobjectHandler', |
|
22 | - '!inline' => 'inlineHandler', |
|
23 | - ]; |
|
18 | + '!!binary' => 'binaryHandler', |
|
19 | + '!set' => 'setHandler', |
|
20 | + '!!omap' => 'omapHandler', |
|
21 | + '!php/object' => 'symfonyPHPobjectHandler', |
|
22 | + '!inline' => 'inlineHandler', |
|
23 | + ]; |
|
24 | 24 | |
25 | 25 | public static $registeredHandlers = []; |
26 | 26 |
@@ -10,16 +10,16 @@ |
||
10 | 10 | */ |
11 | 11 | class NodeComment extends Node |
12 | 12 | { |
13 | - public function specialProcess(Node &$previous, array &$emptyLines):bool |
|
14 | - { |
|
13 | + public function specialProcess(Node &$previous, array &$emptyLines):bool |
|
14 | + { |
|
15 | 15 | $previous->getRoot()->add($this); |
16 | 16 | return true; |
17 | - } |
|
17 | + } |
|
18 | 18 | |
19 | - public function build(&$parent = null) |
|
20 | - { |
|
19 | + public function build(&$parent = null) |
|
20 | + { |
|
21 | 21 | $root = $this->getRoot(); |
22 | 22 | $yamlObject = $root->getYamlObject(); |
23 | 23 | $yamlObject->addComment($this->line, $this->raw); |
24 | - } |
|
24 | + } |
|
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -21,8 +21,8 @@ |
||
21 | 21 | $result = ''; |
22 | 22 | if ($list->count()) { |
23 | 23 | if ($this->identifier !== '+') { |
24 | - self::litteralStripLeading($list); |
|
25 | - self::litteralStripTrailing($list); |
|
24 | + self::litteralStripLeading($list); |
|
25 | + self::litteralStripTrailing($list); |
|
26 | 26 | } |
27 | 27 | $first = $list->shift(); |
28 | 28 | $refIndent = $first->indent ?? 0; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function setIdentifier(string $keyString) |
28 | 28 | { |
29 | 29 | if ($keyString === '') { |
30 | - throw new \ParseError(sprintf(self::ERROR_NO_KEYNAME, $this->line)); |
|
30 | + throw new \ParseError(sprintf(self::ERROR_NO_KEYNAME, $this->line)); |
|
31 | 31 | } else { |
32 | 32 | $keyNode = NodeFactory::get($keyString); |
33 | 33 | if (!is_null($keyNode->_anchor)) { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $list = $value->filterComment(); |
24 | 24 | if (!is_null($list) && $list->count()) { |
25 | 25 | if ($this->identifier !== '+') { |
26 | - self::litteralStripTrailing($list); |
|
26 | + self::litteralStripTrailing($list); |
|
27 | 27 | } |
28 | 28 | $list->setIteratorMode(NodeList::IT_MODE_DELETE); |
29 | 29 | $first = $list->shift(); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | return false; |
131 | 131 | } |
132 | 132 | |
133 | - /** |
|
133 | + /** |
|
134 | 134 | * Find parent target when current Node indentation is lesser than previous node indentation |
135 | 135 | * |
136 | 136 | * @param Node $previous The previous |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | return $this->getParent(); |
167 | 167 | } |
168 | 168 | |
169 | - /** |
|
169 | + /** |
|
170 | 170 | * Find parent target when current Node indentation is superior than previous node indentation |
171 | 171 | * |
172 | 172 | * @param Node $previous The previous |
@@ -79,12 +79,12 @@ |
||
79 | 79 | */ |
80 | 80 | public function checkTypeCoherence($estimatedType):bool |
81 | 81 | { |
82 | - // if ($this->type === self::MAPPING) { |
|
83 | - // if ($estimatedType === self::SEQUENCE) { |
|
84 | - // throw new \ParseError("Error : no coherence in types", 1); |
|
85 | - // } |
|
86 | - // } |
|
87 | - return (bool) $estimatedType; |
|
82 | + // if ($this->type === self::MAPPING) { |
|
83 | + // if ($estimatedType === self::SEQUENCE) { |
|
84 | + // throw new \ParseError("Error : no coherence in types", 1); |
|
85 | + // } |
|
86 | + // } |
|
87 | + return (bool) $estimatedType; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | public function build(&$parent = null) |