public function isViolator($identifier)
    {
        if ($this->storage === null) {
            throw new LogicException('no storage set');
        }

        $time = microtime(true);
        $timestamp = $time;

        $rate = (float) $this->requestsPerTimeSpan / $this->timeSpan;
        $identifier = 'leaky:'.sha1($rate.$identifier);

        $requestCount = $this->storage->getValue($identifier);
        if ($requestCount > 0) {
            $secondsSince = $time - $this->storage->getTimestamp($identifier);
            $reduceBy = floor($secondsSince * $rate);
            $unfinishedSeconds = fmod($secondsSince, $rate);
            $requestCount = max($requestCount - $reduceBy, 0);
            if ($requestCount > 0) {
                $timestamp = $time - ($rate - $unfinishedSeconds);
            }
        }

        if ($requestCount + 1 > $this->requestsPerTimeSpan) {
            return true;
        }

        $requestCount++;

        $this->storage->setValue($identifier, $requestCount);
        $this->storage->setTimestamp($identifier, $timestamp);

        $this->storage->expireIn($identifier, $requestCount / $rate);

        return false;
    }