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

MetricsCollectionCmd   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A execute() 0 6 2
1
<?php
2
3
namespace Jabe\Engine\Impl\Metrics\Reporter;
4
5
use Jabe\Engine\Impl\Interceptor\{
6
    CommandInterface,
7
    CommandContext
8
};
9
10
class MetricsCollectionCmd implements CommandInterface
11
{
12
    protected $logs = [];
13
14
    public function __construct(array $logs)
15
    {
16
        $this->logs = $logs;
17
    }
18
19
    public function execute(CommandContext $commandContext)
20
    {
21
        foreach ($this->logs as $meterLogEntity) {
22
            $commandContext->getMeterLogManager()->insert($meterLogEntity);
23
        }
24
        return null;
25
    }
26
}
27