From 0012a556ebf208c2168deb6867a06bad1c86561b Mon Sep 17 00:00:00 2001 From: jubianchi Date: Wed, 7 Oct 2020 09:20:47 +0200 Subject: [PATCH] fix: Fix an annotation error --- src/lib/Parser.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/Parser.php b/src/lib/Parser.php index d4bae57..6503d36 100644 --- a/src/lib/Parser.php +++ b/src/lib/Parser.php @@ -38,7 +38,7 @@ class Parser private string $originalLabel; /** - * @var callable + * @var callable(Result): mixed */ private $action; @@ -107,7 +107,12 @@ public function map(callable $mapper): self return $parser; } - public function do(?callable $action): self + /** + * @param callable(Result): mixed $action + * + * @return $this + */ + public function do(callable $action): self { $parser = clone $this; $parser->action = $action;