Thruway\Procedure::getNextRoundRobinRegistration PHP Method

getNextRoundRobinRegistration() private method

    private function getNextRoundRobinRegistration()
    {
        /* @var $bestRegistration \Thruway\Registration */
        $bestRegistration = $this->registrations[0];
        /* @var $registration \Thruway\Registration */
        foreach ($this->registrations as $registration) {
            if ($registration->getStatistics()['lastCallStartedAt'] < $bestRegistration->getStatistics()['lastCallStartedAt']) {
                $bestRegistration = $registration;
                break;
            }
        }
        return $bestRegistration;
    }