Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3.1406 |
Changes | 0 |
1 | <?php |
||
25 | 4 | public function collect(Request $request, Response $response, \Exception $exception = null) |
|
26 | { |
||
27 | 4 | $time = 0; |
|
28 | 4 | foreach ($this->callRegistry->getCalls() as $call) { |
|
29 | 4 | $time += (isset($call['duration']) ? $call['duration'] : 0); |
|
30 | } |
||
31 | |||
32 | 4 | $this->data = [ |
|
33 | 4 | 'total' => count($this->callRegistry->getCalls()), |
|
34 | 4 | 'time' => $time, |
|
35 | 4 | 'requests' => $this->callRegistry->getCalls(), |
|
36 | ]; |
||
37 | 4 | } |
|
38 | |||
80 |