BaseResponse::parse()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
nc 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
}