Skip to content

Commit 3901496

Browse files
committed
docs: add PHPDoc comments
1 parent 772a408 commit 3901496

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

app/Config/CURLRequest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class CURLRequest extends BaseConfig
1313
*
1414
* Whether share options between requests or not.
1515
*
16+
* If true, all the options won't be reset between requests.
17+
* It may cause an error request with unnecessary headers.
18+
*
1619
* @var bool
1720
*/
1821
public $shareOptions = true;

system/HTTP/CURLRequest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CURLRequest extends Request
8181
protected $delay = 0.0;
8282

8383
/**
84-
* Default options. Applied to all requests.
84+
* The default options from the constructor. Applied to all requests.
8585
*
8686
* @var array
8787
*/
@@ -90,6 +90,9 @@ class CURLRequest extends Request
9090
/**
9191
* Whether share options between requests or not.
9292
*
93+
* If true, all the options won't be reset between requests.
94+
* It may cause an error request with unnecessary headers.
95+
*
9396
* @var bool
9497
*/
9598
private $shareOptions;
@@ -149,6 +152,9 @@ public function request($method, string $url, array $options = []): ResponseInte
149152
return $this->response;
150153
}
151154

155+
/**
156+
* Reset all options to default.
157+
*/
152158
protected function resetOptions()
153159
{
154160
// Reset headers

0 commit comments

Comments
 (0)