mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-18 09:10:59 +00:00
ParsoidClient: Improve return type documentation for Phan
Change-Id: I1aecdc5ab7a21e1ef43ddcec4f4dbea610822493
This commit is contained in:
parent
9c25161966
commit
ac946cff36
|
@ -14,6 +14,7 @@ interface ParsoidClient {
|
||||||
* @param Language|null $targetLanguage Desired output language
|
* @param Language|null $targetLanguage Desired output language
|
||||||
*
|
*
|
||||||
* @return array An array containing the keys 'body', 'headers', and optionally 'error'
|
* @return array An array containing the keys 'body', 'headers', and optionally 'error'
|
||||||
|
* @phan-return array{body:string,headers:array<string,string>,error?:non-empty-array}
|
||||||
*/
|
*/
|
||||||
public function getPageHtml( RevisionRecord $revision, ?Language $targetLanguage ): 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
|
* @param ?string $etag The ETag to set in the HTTP request header
|
||||||
*
|
*
|
||||||
* @return array An array containing the keys 'body', 'headers', and optionally 'error'
|
* @return array An array containing the keys 'body', 'headers', and optionally 'error'
|
||||||
|
* @phan-return array{body:string,headers:array<string,string>,error?:non-empty-array}
|
||||||
*/
|
*/
|
||||||
public function transformHTML(
|
public function transformHTML(
|
||||||
PageIdentity $page,
|
PageIdentity $page,
|
||||||
|
@ -47,6 +49,7 @@ interface ParsoidClient {
|
||||||
* @param bool $stash Whether to stash the result in the server-side cache (default: `false`)
|
* @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'
|
* @return array An array containing the keys 'body', 'headers', and optionally 'error'
|
||||||
|
* @phan-return array{body:string,headers:array<string,string>,error?:non-empty-array}
|
||||||
*/
|
*/
|
||||||
public function transformWikitext(
|
public function transformWikitext(
|
||||||
PageIdentity $page,
|
PageIdentity $page,
|
||||||
|
|
Loading…
Reference in a new issue