src/Redis/Cluster/Native.php
public function getSlot($command, $args): ?int
    {
        $id = \strtoupper($command);

        $slot = null;

        if (isset($this->commands[$id])) {
            $key = $this->commands[$id]($id, $args);

            if (null !== $key) {
                $slot = $this->getSlotByKey($key);
            }
        }

        return $slot;
    }
public function getSlot($command, $args): ?int
    {
        $id = \strtoupper($command);

        $slot = null;

        if (isset($this->commands[$id])) {
            $key = $this->commands[$id]($id, $args);

            if (null !== $key) {
                $slot = $this->getSlotByKey($key);
            }
        }

        return $slot;
    }
public function getSlot ( $ command , $ args ) : ? int { $ id = \ strtoupper ( $ command ) ; $ slot = null ; if ( isset ( $ this -> commands [ $ id ] ) ) { $ key = $ this -> commands [ $ id ] ( $ id , $ args ) ; if ( null !== $ key ) { $ slot = $ this -> getSlotByKey ( $ key ) ; } } return $ slot ; }
Returns a slot for the given command used for clustering distribution or
NULL when this is not possible.

@param string $command Command name.
@param array  $args

@return int|null
Returns a slot for the given command used for clustering distribution or NULL when this is not possible .