Passed
Push — master ( 9c3e11...5f2b1d )
by Joel
07:39
created

Request::getUserAgent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace RedirectionIO\Client\Sdk\HttpMessage;
4
5
class Request
6
{
7
    private $host;
8
    private $path;
9
    private $userAgent;
10
    private $referer;
11
    private $scheme;
12
    private $method;
13
14
    /**
15
     * @param string $host      Host of the URI instance
16
     * @param string $path      Path of the URI instance
17
     * @param string $userAgent User-Agent header of the request
18
     * @param string $referer   Referer header of the request
19
     * @param string $scheme    "http" or "https"
20
     * @param string $method    GET / POST / PUT / ...
21
     */
22
    public function __construct($host, $path, $userAgent = '', $referer = '', $scheme = 'http', $method = '')
23
    {
24
        $this->host = $host;
25
        $this->path = $path;
26
        $this->userAgent = $userAgent;
27
        $this->referer = $referer;
28
        $this->scheme = $scheme;
29
        $this->method = $method;
30
    }
31
32
    public function getHost()
33
    {
34
        return $this->host;
35
    }
36
37
    public function getPath()
38
    {
39
        return $this->path;
40
    }
41
42
    public function getUserAgent()
43
    {
44
        return $this->userAgent;
45
    }
46
47
    public function getReferer()
48
    {
49
        return $this->referer;
50
    }
51
52
    public function getScheme()
53
    {
54
        return $this->scheme;
55
    }
56
57
    public function getMethod()
58
    {
59
        return $this->method;
60
    }
61
}
62