From 85fdcd5d0f007cc2577c35d4912204e5b254fab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Mei=C3=9Felbach?= Date: Thu, 16 Jun 2022 09:56:46 +0200 Subject: [PATCH] Declare callable return type The subclass may declare a more specific return type. Explicitly annotating it makes psalm aware that FuncService can only ever return callables and thus prevents a MixedFunctionCall error --- src/Factories/FuncService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Factories/FuncService.php b/src/Factories/FuncService.php index 7d0a62c..71e2880 100644 --- a/src/Factories/FuncService.php +++ b/src/Factories/FuncService.php @@ -56,6 +56,7 @@ public function __construct(array $dependencies, callable $function) /** * @inheritDoc + * @return callable */ public function __invoke(ContainerInterface $c) {