Completed
Pull Request — master (#66)
by marijn
05:49
created

MiddlewareResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 27
ccs 0
cts 18
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A newResponse() 0 5 1
A getResponse() 0 4 1
A setResponse() 0 6 1
1
<?php
2
3
namespace garethp\ews\API;
4
5
class MiddlewareResponse
6
{
7
    protected $response;
8
    
9
    protected function __construct($response = null)
10
    {
11
        $this->response = $response;
12
    }
13
14
    public static function newResponse($response = null)
15
    {
16
        $response = new static($response);
17
        return $response;
18
    }
19
20
    public function getResponse()
21
    {
22
        return $this->response;
23
    }
24
25
    public function setResponse($response)
26
    {
27
        $this->response = $response;
28
29
        return $this;
30
    }
31
}
32