Completed
Push — feature/improved-response-hand... ( d991be...85001e )
by Robin
02:01
created

Command::getResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the NNTP library.
5
 *
6
 * (c) Robin van der Vleuten <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Rvdv\Nntp\Command;
13
14
use Rvdv\Nntp\Response\ResponseInterface;
15
16
/**
17
 * @author Robin van der Vleuten <[email protected]>
18
 */
19
abstract class Command implements CommandInterface
20
{
21
    /**
22
     * @var bool
23
     */
24
    protected $isMultiLine;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param bool  $isMultiLine a bool indicating the response is multiline or not
30
     */
31 78
    public function __construct($isMultiLine = false)
32
    {
33 78
        $this->isMultiLine = $isMultiLine;
34 78
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39 13
    public function isMultiLine()
40
    {
41 13
        return $this->isMultiLine;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47 12
    public function isCompressed()
48
    {
49 12
        return false;
50
    }
51
}
52