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

MiddlewareResponse::getResponse()   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 MiddlewareResponse
6
{
7
    protected $response;
8
    
9 28
    protected function __construct($response = null)
10
    {
11 28
        $this->response = $response;
12 28
    }
13
14 28
    public static function newResponse($response = null)
15
    {
16 28
        $response = new static($response);
17 28
        return $response;
18
    }
19
20 28
    public function getResponse()
21
    {
22 28
        return $this->response;
23
    }
24
25 28
    public function setResponse($response)
26
    {
27 28
        $this->response = $response;
28
29 28
        return $this;
30
    }
31
}
32