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

MiddlewareResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
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