private function getBucket($time = null)
    {
        $time = $time ?: time();

        return (int) floor(($time % $this->bucketSpan) / $this->bucketInterval);
    }
private function getBucket($time = null)
    {
        $time = $time ?: time();

        return (int) floor(($time % $this->bucketSpan) / $this->bucketInterval);
    }
private function getBucket ( $ time = null ) { $ time = $ time ? : time ( ) ; return ( int ) floor ( ( $ time % $ this -> bucketSpan ) / $ this -> bucketInterval ) ; }
Get the bucket associated with the current time.

@param int $time (optional) - default is the current time (seconds since epoch)

@return int bucket
Get the bucket associated with the current time .