Predis\Cluster\ClusterStrategy::checkSameSlotForKeys PHP Метод

checkSameSlotForKeys() защищенный Метод

Checks if the specified array of keys will generate the same hash.
protected checkSameSlotForKeys ( array $keys ) : boolean
$keys array Array of keys.
Результат boolean
    protected function checkSameSlotForKeys(array $keys)
    {
        if (!($count = count($keys))) {
            return false;
        }
        $currentSlot = $this->getSlotByKey($keys[0]);
        for ($i = 1; $i < $count; ++$i) {
            $nextSlot = $this->getSlotByKey($keys[$i]);
            if ($currentSlot !== $nextSlot) {
                return false;
            }
            $currentSlot = $nextSlot;
        }
        return true;
    }