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

Command   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 33
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isMultiLine() 0 4 1
A isCompressed() 0 4 1
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