From 7862475b0de83124d1d1ff1bf3fc67457d006b0e Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Wed, 4 Sep 2019 10:17:08 +0200 Subject: [PATCH] Improve various PHP method doc blocks Follows-up 5eac6d131c2a77d0. Change-Id: I92c9d482fd8693a16b3967e763a4eb40b963c562 --- includes/htmlform/HTMLFormField.php | 2 +- includes/htmlform/fields/HTMLCheckMatrix.php | 1 - includes/libs/http/MultiHttpClient.php | 5 ++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 91c6e6a8d0..048abbbf49 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -41,7 +41,7 @@ abstract class HTMLFormField { * the input object itself. It should not implement the surrounding * table cells/rows, or labels/help messages. * - * @param string $value The value to set the input to; eg a default + * @param mixed $value The value to set the input to; eg a default * text for a text input. * * @return string Valid HTML. diff --git a/includes/htmlform/fields/HTMLCheckMatrix.php b/includes/htmlform/fields/HTMLCheckMatrix.php index 595b71e2a0..8e51858d9a 100644 --- a/includes/htmlform/fields/HTMLCheckMatrix.php +++ b/includes/htmlform/fields/HTMLCheckMatrix.php @@ -77,7 +77,6 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable { * mParams['columns'] is an array with column labels as keys and column tags as values. * * @param array $value Array of the options that should be checked - * @suppress PhanParamSignatureMismatch * * @return string */ diff --git a/includes/libs/http/MultiHttpClient.php b/includes/libs/http/MultiHttpClient.php index e099fdb50d..b195a085ef 100644 --- a/includes/libs/http/MultiHttpClient.php +++ b/includes/libs/http/MultiHttpClient.php @@ -294,12 +294,14 @@ class MultiHttpClient implements LoggerAwareInterface { /** * @param array &$req HTTP request map + * @codingStandardsIgnoreStart + * @phan-param array{url:string,proxy?:?string,query:mixed,method:string,body:string|resource,headers:string[],stream?:resource,flags:array} $req + * @codingStandardsIgnoreEnd * @param array $opts * - connTimeout : default connection timeout * - reqTimeout : default request timeout * @return resource * @throws Exception - * @suppress PhanTypeMismatchArgumentInternal */ protected function getCurlHandle( array &$req, array $opts ) { $ch = curl_init(); @@ -410,6 +412,7 @@ class MultiHttpClient implements LoggerAwareInterface { if ( $hasOutputStream ) { return fwrite( $req['stream'], $data ); } else { + // @phan-suppress-next-line PhanTypeArraySuspiciousNullable $req['response']['body'] .= $data; return strlen( $data ); -- 2.20.1