AbstractCommand::getParameters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Pheanstalk\Command;
4
5
use Pheanstalk\Command;
6
use Pheanstalk\Parser\XmlResponseParser;
7
8
/**
9
 * Common functionality for Command implementations.
10
 *
11
 * @author  Valentin Corre
12
 * @package Pheanstalk
13
 * @license http://www.opensource.org/licenses/mit-license.php
14
 */
15
abstract class AbstractCommand implements Command
16
{
17
18
    /**
19
     * @inheritDoc
20
     */
21 17
    public function getFilters(): array
22
    {
23 17
        return [];
24
    }
25
26
    /**
27
     * @inheritDoc
28
     */
29 22
    public function getParameters(): array
30
    {
31 22
        return [];
32
    }
33
34
    /**
35
     * @inheritDoc
36
     */
37 5
    public function getResponseParser()
38
    {
39
        // concrete implementation must either:
40
        // a) implement ResponseParser
41
        // b) override this getResponseParser method
42 5
        return new XmlResponseParser();
43
    }
44
}
45