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