diff --git a/lib/Docopt.php b/lib/Docopt.php index 4ee452a..46c5229 100644 --- a/lib/Docopt.php +++ b/lib/Docopt.php @@ -167,7 +167,9 @@ class Docopt { } } # return Either(*[Required(*e) for e in result]) - return new Either(...$result); // FIXME: This is wrong, but I'm not sure what the Python line does, yet + return new Either(...array_map(function($e) { + return new Required(...$e); + }, $result)); } }