| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
| 36 | { |
||
| 37 | $ms = $this->seconds; |
||
| 38 | |||
| 39 | if (is_array($ms)) { |
||
| 40 | $ms = rand(round($ms[0] * 1000000), round($ms[1] * 1000000)); |
||
| 41 | } else { |
||
| 42 | $ms = round($ms * 1000000); |
||
| 43 | } |
||
| 44 | |||
| 45 | usleep($ms); |
||
| 46 | |||
| 47 | return $next($request, $response); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |