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

MetricsCollectionCmd::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
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