for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace HansOtt\Lottery;
final class LotteryLcg implements Lottery
{
public function isLucky(Ticket $ticket) : bool
$chance = (int) ((float) $ticket->getDivisor() * lcg_value());
return $chance < $ticket->getNumerator();
}