sampleRate = (float) $sampleRate; } /** * Returns TRUE to accept the message, FALSE to block it. * * @param array $event event data * @return bool Accepted ? */ public function filter(array $event) { return (mt_rand() / mt_getrandmax()) <= $this->sampleRate; } }