BaseResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 45
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
parse() 0 1 ?
A setCommand() 0 4 1
A setBody() 0 4 1
1
<?php
2
namespace Disque\Command\Response;
3
4
use Disque\Command\CommandInterface;
5
6
abstract class BaseResponse implements ResponseInterface
7
{
8
    /**
9
     * Command
10
     *
11
     * @var CommandInterface
12
     */
13
    protected $command;
14
15
    /**
16
     * Response body
17
     *
18
     * @var mixed
19
     */
20
    protected $body;
21
22
    /**
23
     * Set command
24
     *
25
     * @param CommandInterface $command Command
26
     */
27
    public function setCommand(CommandInterface $command)
28
    {
29
        $this->command = $command;
30
    }
31
32
    /**
33
     * Set response body
34
     *
35
     * @param mixed $body Response body
36
     * @throws InvalidResponseException
37
     */
38
    public function setBody($body)
39
    {
40
        $this->body = $body;
41
    }
42
43
    /**
44
     * Parse response
45
     *
46
     * @return mixed Parsed response
47
     * @throws InvalidResponseException
48
     */
49
    abstract public function parse();
50
}