ApiResponse   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 52
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getContent() 0 4 1
A getRate() 0 4 1
A getHttpStatus() 0 4 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