From 29aa60d65a4a2eccc86284eee61fa171c917c138 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 28 Oct 2020 09:04:15 +0100 Subject: [PATCH] Type the \OCP\AppFramework\Services\IInitialState::provideLazyInitialState closure with Psalm Signed-off-by: Christoph Wurst --- lib/public/AppFramework/Services/IInitialState.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/public/AppFramework/Services/IInitialState.php b/lib/public/AppFramework/Services/IInitialState.php index 306bb220ba..120ad778b5 100644 --- a/lib/public/AppFramework/Services/IInitialState.php +++ b/lib/public/AppFramework/Services/IInitialState.php @@ -27,6 +27,8 @@ declare(strict_types=1); namespace OCP\AppFramework\Services; +use Closure; + /** * @since 20.0.0 */ @@ -55,6 +57,7 @@ interface IInitialState { * * @param string $key * @param Closure $closure returns a primitive or an object that implements JsonSerializable + * @psalm-param Closure():int|Closure():float|Closure():string|Closure():\JsonSerializable $closure */ - public function provideLazyInitialState(string $key, \Closure $closure): void; + public function provideLazyInitialState(string $key, Closure $closure): void; }