public function onRequest(GetResponseEvent $event)
{
$now = time();
if ($this->deadline < $now) {
// everything should appear to work now
return;
}
$currentProbability = $this->calculateCurrentProbabilityForDisaster($now);
$randomChance = mt_rand(0, 100) / 100;
if ($randomChance <= $currentProbability) {
$disaster = $this->generator->generate();
$disaster();
}
}