1
0
Fork 0

added phpdocs in StreamContextFactory

pull/9063/head
Markus Staab 2020-07-20 20:49:00 +02:00 committed by GitHub
parent 750a92b4b7
commit 4e1dd4bfdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -29,6 +29,7 @@ final class StreamContextFactory
* Creates a context supporting HTTP proxies * Creates a context supporting HTTP proxies
* *
* @param string $url URL the context is to be used for * @param string $url URL the context is to be used for
* @psalm-param array{http: array{follow_location?: int, max_redirects?: int, header?: string|array<string, string|int>}} $defaultOptions
* @param array $defaultOptions Options to merge with the default * @param array $defaultOptions Options to merge with the default
* @param array $defaultParams Parameters to specify on the context * @param array $defaultParams Parameters to specify on the context
* @throws \RuntimeException if https proxy required and OpenSSL uninstalled * @throws \RuntimeException if https proxy required and OpenSSL uninstalled
@ -56,7 +57,8 @@ final class StreamContextFactory
/** /**
* @param string $url * @param string $url
* @param array $options * @param array $options
* @return array ['http' => ['header' => [...], 'proxy' => '..', 'request_fulluri' => bool]] formatted as a stream context array * @psalm-return array{http:{header: string[], proxy?: string, request_fulluri: bool}, ssl: array}
* @return array formatted as a stream context array
*/ */
public static function initOptions($url, array $options) public static function initOptions($url, array $options)
{ {