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