src/Neutrino/Middleware/Throttle.php
public function before(Event $event, $source, $data = null)
    {
        $signature = $this->resolveRequestSignature();

        $limiter = $this->getLimiter();

        if ($limiter->tooManyAttempts($signature, $this->max, $this->decay)) {
            $this->addHeader($signature, true);

            return false;
        }

        $limiter->hit($signature, $this->decay);

        $this->addHeader($this->resolveRequestSignature(), false);

        return true;
    }
public function before(Event $event, $source, $data = null)
    {
        $signature = $this->resolveRequestSignature();

        $limiter = $this->getLimiter();

        if ($limiter->tooManyAttempts($signature, $this->max, $this->decay)) {
            $this->addHeader($signature, true);

            return false;
        }

        $limiter->hit($signature, $this->decay);

        $this->addHeader($this->resolveRequestSignature(), false);

        return true;
    }
Called before the execution of handler

@param \Phalcon\Events\Event|mixed $event
@param \Phalcon\Dispatcher|mixed   $source
@param mixed|null                  $data

@throws \Exception
@return bool