Skip to content

Commit 649a88b

Browse files
committed
Style fixes and docs
1 parent 0598628 commit 649a88b

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

src/HttpClientPool.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
*/
1414
abstract class HttpClientPool implements HttpAsyncClient, HttpClient
1515
{
16-
/** @var HttpClientPoolItem[] */
16+
/**
17+
* @var HttpClientPoolItem[]
18+
*/
1719
protected $clientPool = [];
1820

1921
/**
2022
* Add a client to the pool.
2123
*
22-
* @param HttpClient|HttpAsyncClient $client
24+
* @param HttpClient|HttpAsyncClient|HttpClientPoolItem $client
2325
*/
2426
public function addHttpClient($client)
2527
{

src/HttpClientPoolItem.php

+19-7
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,29 @@
1717
*/
1818
class HttpClientPoolItem implements HttpClient, HttpAsyncClient
1919
{
20-
/** @var int Number of request this client is currently sending */
20+
/**
21+
* @var int Number of request this client is currently sending
22+
*/
2123
private $sendingRequestCount = 0;
2224

23-
/** @var \DateTime|null Time when this client has been disabled or null if enable */
25+
/**
26+
* @var \DateTime|null Time when this client has been disabled or null if enable
27+
*/
2428
private $disabledAt;
2529

26-
/** @var int|null Number of seconds after this client is reenable, by default null: never reenable this client */
30+
/**
31+
* @var int|null Number of seconds after this client is reenable, by default null: never reenable this client
32+
*/
2733
private $reenableAfter;
2834

29-
/** @var FlexibleHttpClient A http client responding to async and sync request */
35+
/**
36+
* @var FlexibleHttpClient A http client responding to async and sync request
37+
*/
3038
private $client;
3139

3240
/**
33-
* {@inheritdoc}
3441
*
42+
* @param HttpClient|HttpAsyncClient $client
3543
* @param null|int $reenableAfter Number of seconds after this client is reenable
3644
*/
3745
public function __construct($client, $reenableAfter = null)
@@ -91,9 +99,11 @@ public function sendAsyncRequest(RequestInterface $request)
9199
*
92100
* Will also reactivate this client if possible
93101
*
102+
* @internal
103+
*
94104
* @return bool
95105
*/
96-
public function isDisabled()
106+
final public function isDisabled()
97107
{
98108
$disabledAt = $this->getDisabledAt();
99109

@@ -116,9 +126,11 @@ public function isDisabled()
116126
/**
117127
* Get current number of request that is send by the underlying http client.
118128
*
129+
* @internal
130+
*
119131
* @return int
120132
*/
121-
public function getSendingRequestCount()
133+
final public function getSendingRequestCount()
122134
{
123135
return $this->sendingRequestCount;
124136
}

0 commit comments

Comments
 (0)