Completed
Push — master ( 649e1f...bdce94 )
by Gareth
04:10
created

MiddlewareRequest::getArguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace garethp\ews\API;
4
5
class MiddlewareRequest
6
{
7
    protected $name;
8
9
    protected $arguments;
10
11
    protected $options;
12
13 28
    protected function __construct($name, $arguments, $options)
14
    {
15 28
        $this->name = $name;
16 28
        $this->arguments = $arguments;
17 28
        $this->options = $options;
18 28
    }
19
20 28
    public static function newRequest($name, $arguments, $options)
21
    {
22 28
        $request = new static($name, $arguments, $options);
23 28
        return $request;
24
    }
25
26 28
    public function getRequest()
27
    {
28 28
        return $this->arguments[0];
29
    }
30
31 28
    public function setRequest($request)
32
    {
33 28
        $this->arguments[0] = $request;
34
35 28
        return $this;
36
    }
37
38 28
    public function getName()
39
    {
40 28
        return $this->name;
41
    }
42
43 28
    public function getOptions()
44
    {
45 28
        return $this->options;
46
    }
47
48 28
    public function getArguments()
49
    {
50 28
        return $this->arguments;
51
    }
52
}
53