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

StatsTubeCommand   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 7
c 1
b 0
f 0
dl 0
loc 35
ccs 0
cts 16
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getGroup() 0 3 1
A getFilters() 0 4 1
A getAction() 0 3 1
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