MiddlewareRequest   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 46
ccs 18
cts 18
cp 1
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A setRequest() 0 5 1
A getArguments() 0 3 1
A getName() 0 3 1
A newRequest() 0 4 1
A getRequest() 0 3 1
A __construct() 0 5 1
A getOptions() 0 3 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 30
    protected function __construct($name, $arguments, $options)
14
    {
15 30
        $this->name = $name;
16 30
        $this->arguments = $arguments;
17 30
        $this->options = $options;
18
    }
19
20 30
    public static function newRequest($name, $arguments, $options)
21
    {
22 30
        $request = new static($name, $arguments, $options);
23 30
        return $request;
24
    }
25
26 30
    public function getRequest()
27
    {
28 30
        return $this->arguments[0];
29
    }
30
31 2
    public function setRequest($request)
32
    {
33 2
        $this->arguments[0] = $request;
34
35 2
        return $this;
36
    }
37
38 30
    public function getName()
39
    {
40 30
        return $this->name;
41
    }
42
43 2
    public function getOptions()
44
    {
45 2
        return $this->options;
46
    }
47
48 30
    public function getArguments()
49
    {
50 30
        return $this->arguments;
51
    }
52
}
53