Skip to content

Commit 2d92d05

Browse files
committed
:octocat: rename HTTPOptions::$windowSize -> $window_size
1 parent e1a872e commit 2d92d05

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/CurlUtils/CurlMultiClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct(
7474

7575
$curl_multi_options = [
7676
CURLMOPT_PIPELINING => CURLPIPE_MULTIPLEX,
77-
CURLMOPT_MAXCONNECTS => $this->options->windowSize,
77+
CURLMOPT_MAXCONNECTS => $this->options->window_size,
7878
] + $this->options->curl_multi_options;
7979

8080
foreach($curl_multi_options as $k => $v){
@@ -141,7 +141,7 @@ public function process():CurlMultiClient{
141141
}
142142

143143
// shoot out the first batch of requests
144-
for($i = 0; $i < $this->options->windowSize; $i++){
144+
for($i = 0; $i < $this->options->window_size; $i++){
145145
$this->createHandle();
146146
}
147147

src/HTTPOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* @property array $curl_options
1818
* @property string $ca_info
1919
* @property bool $ssl_verifypeer
20-
* @property int $windowSize
20+
* @property int $window_size
2121
* @property int|float $sleep
2222
* @property int $timeout
2323
* @property int $retries

src/HTTPOptionsTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ trait HTTPOptionsTrait{
2323
/**
2424
* A custom user agent string
2525
*/
26-
protected string $user_agent = 'chillerlanHttpInterface/2.0 +https://github.com/chillerlan/php-httpinterface';
26+
protected string $user_agent = 'chillerlanHttpInterface/5.0 +https://github.com/chillerlan/php-httpinterface';
2727

2828
/**
2929
* options for each curl instance
@@ -60,7 +60,7 @@ trait HTTPOptionsTrait{
6060
/**
6161
* maximum of concurrent requests for curl_multi
6262
*/
63-
protected int $windowSize = 5;
63+
protected int $window_size = 5;
6464

6565
/**
6666
* sleep timer (milliseconds) between each fired multi request on startup

0 commit comments

Comments
 (0)