Test Failed
Push — main ( d2d042...ea42f2 )
by Bingo
13:21
created

MetricsQuerySumCmd   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A execute() 0 4 1
1
<?php
2
3
namespace Jabe\Engine\Impl\Metrics;
4
5
use Jabe\Engine\Impl\Interceptor\{
6
    CommandInterface,
7
    CommandContext
8
};
9
10
class MetricsQuerySumCmd implements CommandInterface
11
{
12
    protected $metricsQuery;
13
14
    public function __construct(MetricsQueryImpl $metricsQuery)
15
    {
16
        $this->metricsQuery = $metricsQuery;
17
    }
18
19
    public function execute(CommandContext $commandContext)
20
    {
21
        return $commandContext->getMeterLogManager()
22
            ->executeSelectSum($metricsQuery);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $metricsQuery seems to be never defined.
Loading history...
23
    }
24
}
25