|
|
@ -152,12 +152,12 @@ class Docopt { |
|
|
|
# groups.append(child.children + children) |
|
|
|
if ($child instanceof Either) { |
|
|
|
foreach ($child->children as $c) { |
|
|
|
$groups[] = [$c, ...$children]; |
|
|
|
$groups[] = array_merge([$c], $children); |
|
|
|
} |
|
|
|
} elseif ($child instanceof OneOrMore) { |
|
|
|
$groups[] = [...$child->children, ...$child->children, ...$children]; |
|
|
|
$groups[] = array_merge($child->children, $child->children, $children); |
|
|
|
} else { |
|
|
|
$groups[] = [...$child->children, ...$children]; |
|
|
|
$groups[] = array_merge($child->children, $children); |
|
|
|
} |
|
|
|
} |
|
|
|
# else: |
|
|
|