ApiResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 9.6666
cc 1
eloc 7
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Twitter\API\REST\Response;
4
5
class ApiResponse
6
{
7
    /** @var HttpStatus */
8
    private $httpStatus;
9
10
    /** @var ApiRate */
11
    private $rate;
12
13
    /** @var mixed */
14
    private $content;
15
16
    /**
17
     * ApiResponse constructor.
18
     *
19
     * @param HttpStatus $httpStatus
20
     * @param mixed      $content
21
     * @param ApiRate    $rate
22
     */
23 108
    public function __construct(
24
        HttpStatus $httpStatus,
25
        $content,
26
        ApiRate $rate
27
    ) {
28 108
        $this->httpStatus = $httpStatus;
29 108
        $this->content = $content;
30 108
        $this->rate = $rate;
31 108
    }
32
33
    /**
34
     * @return HttpStatus
35
     */
36 15
    public function getHttpStatus()
37
    {
38 15
        return $this->httpStatus;
39
    }
40
41
    /**
42
     * @return array|object|null
43
     */
44 51
    public function getContent()
45
    {
46 51
        return $this->content;
47
    }
48
49
    /**
50
     * @return ApiRate
51
     */
52 66
    public function getRate()
53
    {
54 66
        return $this->rate;
55
    }
56
}
57