Completed
Push — master ( ec4c56...bd8716 )
by David
04:49
created

RequestAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setRequest() 0 4 1
A getRequest() 0 4 1
1
<?php
2
3
namespace Http\Client\Exception;
4
5
use Psr\Http\Message\RequestInterface;
6
7
trait RequestAwareTrait
8
{
9
    /**
10
     * @var RequestInterface
11
     */
12
    private $request;
13
14 16
    private function setRequest(RequestInterface $request)
15
    {
16 16
        $this->request = $request;
17 16
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22 2
    public function getRequest(): RequestInterface
23
    {
24 2
        return $this->request;
25
    }
26
}
27