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

Request   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getReferer() 0 3 1
A getUserAgent() 0 3 1
A getScheme() 0 3 1
A getPath() 0 3 1
A getHost() 0 3 1
A __construct() 0 7 1
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