X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhttp%2FMWHttpRequest.php;h=0f3096ef9674ce0f531fda908347a089a111cb1d;hb=f8249ea4e2b9009e3bd229d8c0710590b9d1d04d;hp=41ea1dce358813b85654bf0d1d2f65059673d8c8;hpb=835a1c38f00b601fbcc81a2aad8639160ccb1bc1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php index 41ea1dce35..0f3096ef96 100644 --- a/includes/http/MWHttpRequest.php +++ b/includes/http/MWHttpRequest.php @@ -46,6 +46,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface { protected $sslVerifyCert = true; protected $caInfo = null; protected $method = "GET"; + /** @var array */ protected $reqHeaders = []; protected $url; protected $parsedUrl; @@ -63,6 +64,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface { protected $headerList = []; protected $respVersion = "0.9"; protected $respStatus = "200 Ok"; + /** @var string[][] */ protected $respHeaders = []; /** @var StatusValue */ @@ -86,6 +88,9 @@ abstract class MWHttpRequest implements LoggerAwareInterface { /** * @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL * @param array $options (optional) extra params to pass (see HttpRequestFactory::create()) + * @codingStandardsIgnoreStart + * @phan-param array{timeout?:int|string,connectTimeout?:int|string,postData?:array,proxy?:string,noProxy?:bool,sslVerifyHost?:bool,sslVerifyCert?:bool,caInfo?:string,maxRedirects?:int,followRedirects?:bool,userAgent?:string,logger?:LoggerInterface,username?:string,password?:string,originalRequest?:WebRequest|array{ip:string,userAgent:string},method?:string} $options + * @codingStandardsIgnoreEnd * @param string $caller The method making this request, for profiling * @param Profiler|null $profiler An instance of the profiler for profiling, or null * @throws Exception @@ -139,6 +144,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface { // ensure that MWHttpRequest::method is always // uppercased. T38137 if ( $o == 'method' ) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $options[$o] = strtoupper( $options[$o] ); } $this->$o = $options[$o]; @@ -366,7 +372,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface { /** * Take care of whatever is necessary to perform the URI request. * - * @return StatusValue + * @return Status * @note currently returns Status for B/C */ public function execute() {