ResponderTrait::setResponder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace Germania\Responder;
3
4
use Slim\Psr7\Factory\ResponseFactory;
5
6
trait ResponderTrait
7
{
8
9
10
    /**
11
     * @var ResponderInterface
12
     */
13
    protected $responder;
14
15
16
    /**
17
     * Returns the Responder.
18
     *
19
     * @return ResponderInterface|null
20
     */
21 8
    public function getResponder() : ?ResponderInterface
22
    {
23 8
        return $this->responder;
24
    }
25
26
27
    /**
28
     * Sets the Responder.
29
     *
30
     * @param ResponderInterface $responder
31
     */
32 2
    public function setResponder( ResponderInterface $responder )
33
    {
34 2
        $this->responder = $responder;
35 2
        return $this;
36
    }
37
}
38