From ac946cff36694a7974f0bc252b2310d7e70e7fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 21 Oct 2022 00:46:45 +0200 Subject: [PATCH] ParsoidClient: Improve return type documentation for Phan Change-Id: I1aecdc5ab7a21e1ef43ddcec4f4dbea610822493 --- includes/ParsoidClient.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/ParsoidClient.php b/includes/ParsoidClient.php index bad6bf4280..3a49e29e44 100644 --- a/includes/ParsoidClient.php +++ b/includes/ParsoidClient.php @@ -14,6 +14,7 @@ interface ParsoidClient { * @param Language|null $targetLanguage Desired output language * * @return array An array containing the keys 'body', 'headers', and optionally 'error' + * @phan-return array{body:string,headers:array,error?:non-empty-array} */ public function getPageHtml( RevisionRecord $revision, ?Language $targetLanguage ): array; @@ -27,6 +28,7 @@ interface ParsoidClient { * @param ?string $etag The ETag to set in the HTTP request header * * @return array An array containing the keys 'body', 'headers', and optionally 'error' + * @phan-return array{body:string,headers:array,error?:non-empty-array} */ public function transformHTML( PageIdentity $page, @@ -47,6 +49,7 @@ interface ParsoidClient { * @param bool $stash Whether to stash the result in the server-side cache (default: `false`) * * @return array An array containing the keys 'body', 'headers', and optionally 'error' + * @phan-return array{body:string,headers:array,error?:non-empty-array} */ public function transformWikitext( PageIdentity $page,