src/Cluster/ClusterStrategy.php
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;
    }
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;
    }
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 ; }
Checks if the specified array of keys will generate the same hash.

@param array $keys Array of keys.

@return bool
Checks if the specified array of keys will generate the same hash .