Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
HttpClientResponse
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 disposeImpl
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Http\Client;
6
7use CurlHandle;
8use PeServer\Core\Binary;
9use PeServer\Core\DisposerBase;
10use PeServer\Core\Http\Client\HttpClientOptions;
11use PeServer\Core\Http\Client\HttpClientRequest;
12use PeServer\Core\Http\Client\HttpClientStatus;
13use PeServer\Core\Http\HttpHeader;
14use PeServer\Core\Throws\HttpClientException;
15
16/** */
17class HttpClientResponse extends DisposerBase
18{
19    /**
20     * 生成。
21     *
22     * @param HttpClientOptions $options
23     * @param HttpClientRequest $request
24     * @param CurlHandle $curlHandle
25     * @param HttpHeader $header
26     * @param Binary $content
27     * @param HttpClientInformation $information
28     * @param HttpClientStatus $clientStatus
29     */
30    public function __construct(
31        readonly public HttpClientOptions $options,
32        readonly public HttpClientRequest $request,
33        private CurlHandle $curlHandle,
34        readonly public HttpHeader $header,
35        readonly public Binary $content,
36        readonly public HttpClientInformation $information,
37        readonly public HttpClientStatus $clientStatus
38    ) {
39    }
40
41    #region function
42
43
44    #endregion
45
46    #region DisposerBase
47
48    protected function disposeImpl(): void
49    {
50        curl_close($this->curlHandle);
51    }
52
53    #endregion
54}