Request::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Risan\OAuth1\Request;
4
5
class Request implements RequestInterface
6
{
7
    /**
8
     * The request HTTP method.
9
     *
10
     * @var string
11
     */
12
    protected $method;
13
14
    /**
15
     * The request URI.
16
     *
17
     * @var string
18
     */
19
    protected $uri;
20
21
    /**
22
     * The request options.
23
     *
24
     * @var array
25
     */
26
    protected $options;
27
28
    /**
29
     * Create a new instance of Request class.
30
     *
31
     * @param string $method
32
     * @param string $uri
33
     * @param array  $options
34
     */
35 4
    public function __construct($method, $uri, $options = [])
36
    {
37 4
        $this->method = $method;
38 4
        $this->uri = $uri;
39 4
        $this->options = $options;
40 4
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 1
    public function getMethod()
46
    {
47 1
        return $this->method;
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53 1
    public function getUri()
54
    {
55 1
        return $this->uri;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61 1
    public function getOptions()
62
    {
63 1
        return $this->options;
64
    }
65
}
66