Improve various PHP method doc blocks
authorDaimona Eaytoy <daimona.wiki@gmail.com>
Wed, 4 Sep 2019 08:17:08 +0000 (10:17 +0200)
committerDaimona Eaytoy <daimona.wiki@gmail.com>
Thu, 5 Sep 2019 18:45:40 +0000 (18:45 +0000)
Follows-up 5eac6d131c2a77d0.

Change-Id: I92c9d482fd8693a16b3967e763a4eb40b963c562

includes/htmlform/HTMLFormField.php
includes/htmlform/fields/HTMLCheckMatrix.php
includes/libs/http/MultiHttpClient.php

index 91c6e6a..048abbb 100644 (file)
@@ -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.
index 595b71e..8e51858 100644 (file)
@@ -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
         */
index e099fdb..b195a08 100644 (file)
@@ -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 );