Passed
Push — master ( 4a6f0d...73b924 )
by Valentin
03:29
created

StatsTubeCommand::getResponseParser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Pheanstalk\Command;
4
5
use Pheanstalk\XmlResponseParser;
6
use Pheanstalk\YamlResponseParser;
7
8
/**
9
 * The 'stats-tube' command.
10
 *
11
 * Gives statistical information about the specified tube if it exists.
12
 *
13
 * @author  Paul Annesley
14
 * @package Pheanstalk
15
 * @license http://www.opensource.org/licenses/mit-license.php
16
 */
17
class StatsTubeCommand extends AbstractCommand
18
{
19
    private $_tube;
20
21
    /**
22
     * @param string $tube
23
     */
24
    public function __construct($tube)
25
    {
26
        $this->_tube = $tube;
27
    }
28
29
    /**
30
     * @inheritDoc
31
     */
32
    public function getGroup(): string
33
    {
34
        return 'queue';
35
    }
36
37
    /**
38
     * @inheritDoc
39
     */
40
    public function getAction(): string
41
    {
42
        return 'get';
43
    }
44
45
    /**
46
     * @inheritDoc
47
     */
48
    public function getFilters(): array
49
    {
50
        return [
51
            'id' => $this->_tube
52
        ];
53
    }
54
}
55