Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
21 | 1 | public function collect(): ObservableInterface |
|
22 | { |
||
23 | 1 | $metrics = []; |
|
24 | |||
25 | /** |
||
26 | * @var string $key |
||
27 | * @var MeasureMiddleware $middleware |
||
28 | */ |
||
29 | 1 | foreach ($this->middleware as $key => $middleware) { |
|
30 | /** @var Metric $metric */ |
||
31 | 1 | foreach ($middleware->collect() as $metricKey => $metricValue) { |
|
32 | 1 | $metrics[] = new Metric( |
|
33 | 1 | $key . '.' . $metricKey, |
|
34 | 1 | $metricValue |
|
35 | ); |
||
36 | } |
||
37 | } |
||
38 | |||
39 | 1 | return observableFromArray($metrics); |
|
40 | } |
||
41 | |||
47 |