From c2efad1f9b4bfd11e16a55ec9e731161618c7607 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 9 Feb 2022 23:47:06 -0500 Subject: [PATCH] Complete return of transform function --- lib/Docopt.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); } }