Test Failed
Pull Request — master (#47)
by Michael
02:07
created

Response::getTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
/*
6
 * This file is part of the AppleApnPush package
7
 *
8
 * (c) Vitaliy Zhuk <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code
12
 */
13
14
namespace Apple\ApnPush\Protocol\Http;
15
16
/**
17
 * Object for presentation http response
18
 */
19
class Response
20
{
21
    /**
22
     * @var float
23
     */
24
    private $time;
25
26
    /**
27
     * @var int
28
     */
29
    private $statusCode;
30
31
    /**
32
     * @var string
33
     */
34
    private $content;
35
36
    /**
37
     * Constructor.
38
     *
39
     * @param int    $statusCode
40
     * @param string $content
41
     * @param float  $requestTime
42
     */
43
    public function __construct(int $statusCode, string $content, float $requestTime)
44
    {
45
        $this->statusCode = $statusCode;
46
        $this->content = $content;
47
        $this->time = $requestTime;
48
    }
49
50
    /**
51
     * Get status code
52
     *
53
     * @return int
54
     */
55
    public function getStatusCode(): int
56
    {
57
        return $this->statusCode;
58
    }
59
60
    /**
61
     * Get request time
62
     *
63
     * @return float
64
     */
65
    public function getTime(): float
66
    {
67
        return $this->time;
68
    }
69
70
    /**
71
     * Get content
72
     *
73
     * @return string
74
     */
75
    public function getContent(): string
76
    {
77
        return $this->content;
78
    }
79
}
80