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