@@ -21,12 +21,12 @@ |
||
| 21 | 21 | private const NO_NAME = '%s Error: a tag MUST have a name'; |
| 22 | 22 | private const WRONG_VALUE = "Error : cannot transform tag '%s' for type '%s'"; |
| 23 | 23 | private const LEGACY_TAGS_HANDLERS = ['!str' => 'strHandler', |
| 24 | - '!binary' => 'binaryHandler', |
|
| 25 | - '!set' => 'setHandler', |
|
| 26 | - '!omap' => 'mapHandler', |
|
| 27 | - 'php/object' => 'symfonyPHPobjectHandler', |
|
| 28 | - '!inline' => 'inlineHandler', |
|
| 29 | - '!long' => 'longHandler']; |
|
| 24 | + '!binary' => 'binaryHandler', |
|
| 25 | + '!set' => 'setHandler', |
|
| 26 | + '!omap' => 'mapHandler', |
|
| 27 | + 'php/object' => 'symfonyPHPobjectHandler', |
|
| 28 | + '!inline' => 'inlineHandler', |
|
| 29 | + '!long' => 'longHandler']; |
|
| 30 | 30 | |
| 31 | 31 | public static $registeredHandlers = []; |
| 32 | 32 | |
@@ -10,15 +10,15 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | class NodeComment extends Node |
| 12 | 12 | { |
| 13 | - /** |
|
| 14 | - * According to the current Node type and deepest value |
|
| 15 | - * this indicates if self::parse skips (or not) the parent and previous assignment |
|
| 16 | - * |
|
| 17 | - * @param Node $target The parent target Node |
|
| 18 | - * |
|
| 19 | - * @return boolean True if context, False otherwiser |
|
| 20 | - * @todo is this really necessary according ot other checkings out there ? |
|
| 21 | - */ |
|
| 13 | + /** |
|
| 14 | + * According to the current Node type and deepest value |
|
| 15 | + * this indicates if self::parse skips (or not) the parent and previous assignment |
|
| 16 | + * |
|
| 17 | + * @param Node $target The parent target Node |
|
| 18 | + * |
|
| 19 | + * @return boolean True if context, False otherwiser |
|
| 20 | + * @todo is this really necessary according ot other checkings out there ? |
|
| 21 | + */ |
|
| 22 | 22 | public function skipOnContext(Node &$target):bool |
| 23 | 23 | { |
| 24 | 24 | if (!$this->identifier) { |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | return false; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function needsSpecialProcess(Node &$previous, array &$emptyLines):bool |
|
| 32 | - { |
|
| 31 | + public function needsSpecialProcess(Node &$previous, array &$emptyLines):bool |
|
| 32 | + { |
|
| 33 | 33 | $deepest = $previous->getDeepestNode(); |
| 34 | 34 | if (!($previous->getParent() instanceof NodeLiterals) |
| 35 | 35 | && !($deepest instanceof NodeLiterals)) { |
@@ -37,5 +37,5 @@ discard block |
||
| 37 | 37 | return true; |
| 38 | 38 | } |
| 39 | 39 | return false; |
| 40 | - } |
|
| 40 | + } |
|
| 41 | 41 | } |
| 42 | 42 | \ No newline at end of file |
@@ -76,8 +76,8 @@ |
||
| 76 | 76 | } |
| 77 | 77 | if ($list->count()) { |
| 78 | 78 | if ($this->modifier !== '+') { |
| 79 | - self::litteralStripLeading($list); |
|
| 80 | - self::litteralStripTrailing($list); |
|
| 79 | + self::litteralStripLeading($list); |
|
| 80 | + self::litteralStripTrailing($list); |
|
| 81 | 81 | } |
| 82 | 82 | $first = $list->shift(); |
| 83 | 83 | $refIndent = $first->indent ?? 0; |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | $result = ''; |
| 17 | 17 | if ($list->count()) { |
| 18 | 18 | if ($modifier !== '+') { |
| 19 | - self::litteralStripLeading($list); |
|
| 20 | - self::litteralStripTrailing($list); |
|
| 19 | + self::litteralStripLeading($list); |
|
| 20 | + self::litteralStripTrailing($list); |
|
| 21 | 21 | } |
| 22 | 22 | $first = $list->shift(); |
| 23 | 23 | $refIndent = $first->indent ?? 0; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | // } else { |
| 22 | 22 | // $this->specialProcess($previous, $emptyLines); |
| 23 | 23 | // } |
| 24 | - if ($previous instanceof NodeScalar) $emptyLines[] = $this->setParent($previous->getParent()); |
|
| 24 | + if ($previous instanceof NodeScalar) $emptyLines[] = $this->setParent($previous->getParent()); |
|
| 25 | 25 | if ($deepest instanceof NodeLiterals) $emptyLines[] = $this->setParent($deepest); |
| 26 | 26 | return true; |
| 27 | 27 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $this->raw = $nodeString; |
| 41 | 41 | $this->line = (int) $line; |
| 42 | - //permissive to tabs but replacement |
|
| 42 | + //permissive to tabs but replacement |
|
| 43 | 43 | $nodeValue = preg_replace("/^\t+/m", " ", $nodeString); |
| 44 | 44 | $this->indent = strspn($nodeValue, ' '); |
| 45 | 45 | // $this->value = $nodeString; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | return $previous->getParent(); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - /** |
|
| 176 | + /** |
|
| 177 | 177 | * Modify parent target when current Node indentation is superior to previous node indentation |
| 178 | 178 | * |
| 179 | 179 | * @param Node $previous The previous |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | return false; |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - /** |
|
| 198 | + /** |
|
| 199 | 199 | * According to the current Node type and deepest value |
| 200 | 200 | * this indicates if self::parse skips (or not) the parent and previous assignment |
| 201 | 201 | * |