Passed
Push — master ( 6a7e64...68c8aa )
by Oss
02:39
created

Response::getBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @category    Brownie/HttpClient
4
 * @author      Brownie <[email protected]>
5
 * @license     http://www.gnu.org/copyleft/lesser.html
6
 */
7
8
namespace Brownie\HttpClient;
9
10
use Brownie\HttpClient\Cookie\CookieList;
11
use Brownie\HttpClient\Header\HeaderList;
12
use Brownie\Util\StorageArray;
13
14
/**
15
 * HTTP client response.
16
 *
17
 * @method Response     setBody(string $responseBody)               Sets response body.
18
 * @method string       getBody()                                   Returns response body.
19
 * @method Response     setHttpCode(int $httpCode)                  Sets HTTP response code.
20
 * @method int          getHttpCode()                               Returns HTTP response code.
21
 * @method Response     setRuntime(float $runtime)                  Sets request execution time.
22
 * @method float        getRuntime()                                Returns request execution time.
23
 * @method Response     setHttpHeaderList(HeaderList $headerList)   Sets the headers of the http response.
24
 * @method HeaderList   getHttpHeaderList()                         Returns the headers of the http response.
25
 * @method Response     setHttpCookieList(CookieList $cookieList)   Sets the cookies of the http response.
26
 * @method CookieList   getHttpCookieList()                         Returns the cookies of the http response.
27
 */
28
class Response extends StorageArray
29
{
30
31
    protected $fields = array(
32
        'body' => null,             // Response body.
33
        'httpCode' => null,         // HTTP response code.
34
        'runtime' => null,          // Request execution time.
35
        'httpHeaderList' => null,   // Header list.
36
        'httpCookieList' => null,   // Cookie list.
37
    );
38
}
39