Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 685acf6

Browse files
Merge pull request #59 from php-http/php7
Some more PHP 7 type hinting
2 parents 87e76cc + d8e30e3 commit 685acf6

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/Client.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ final class Client implements HttpClient, HttpAsyncClient
2323
*/
2424
private $client;
2525

26-
/**
27-
* @param ClientInterface|null $client
28-
*/
2926
public function __construct(ClientInterface $client = null)
3027
{
3128
if (!$client) {
@@ -36,13 +33,9 @@ public function __construct(ClientInterface $client = null)
3633
}
3734

3835
/**
39-
* Factory method to create the guzzle 6 adapter with custom configuration for guzzle.
40-
*
41-
* @param array $config Configuration to create guzzle with.
42-
*
43-
* @return Client
36+
* Factory method to create the Guzzle 6 adapter with custom Guzzle configuration.
4437
*/
45-
public static function createWithConfig(array $config)
38+
public static function createWithConfig(array $config): Client
4639
{
4740
return new self(self::buildClient($config));
4841
}
@@ -68,13 +61,9 @@ public function sendAsyncRequest(RequestInterface $request)
6861
}
6962

7063
/**
71-
* Build the guzzle client instance.
72-
*
73-
* @param array $config Additional configuration
74-
*
75-
* @return GuzzleClient
64+
* Build the Guzzle client instance.
7665
*/
77-
private static function buildClient(array $config = [])
66+
private static function buildClient(array $config = []): GuzzleClient
7867
{
7968
$handlerStack = new HandlerStack(\GuzzleHttp\choose_handler());
8069
$handlerStack->push(Middleware::prepareBody(), 'prepare_body');

0 commit comments

Comments
 (0)