Passed
Push — master ( d7e571...33e6b0 )
by Joel
03:23
created

Request::getScheme()   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
13
    /**
14
     * @param string $host      Host of the URI instance
15
     * @param string $path      Path of the URI instance
16
     * @param string $userAgent User-Agent header of the request
17
     * @param string $referer   Referer header of the request
18
     */
19
    public function __construct($host, $path, $userAgent, $referer = '', $scheme = 'http')
20
    {
21
        $this->host = $host;
22
        $this->path = $path;
23
        $this->userAgent = $userAgent;
24
        $this->referer = $referer;
25
        $this->scheme = $scheme;
26
    }
27
28
    public function getHost()
29
    {
30
        return $this->host;
31
    }
32
33
    public function getPath()
34
    {
35
        return $this->path;
36
    }
37
38
    public function getUserAgent()
39
    {
40
        return $this->userAgent;
41
    }
42
43
    public function getReferer()
44
    {
45
        return $this->referer;
46
    }
47
48
    public function getScheme()
49
    {
50
        return $this->scheme;
51
    }
52
}
53