protected static function normalizeHostString($hostString, $port = 26379)
    {
        $hosts = [ ];

        foreach (explode(',', $hostString) as $host) {
            $host = trim($host);

            if (Str::contains($host, ':')) {
                $hosts[] = $host;
            } else {
                $hosts[] = [ 'host' => $host, 'port' => $port ];
            }
        }

        return $hosts;
    }
protected static function normalizeHostString($hostString, $port = 26379)
    {
        $hosts = [ ];

        foreach (explode(',', $hostString) as $host) {
            $host = trim($host);

            if (Str::contains($host, ':')) {
                $hosts[] = $host;
            } else {
                $hosts[] = [ 'host' => $host, 'port' => $port ];
            }
        }

        return $hosts;
    }
protected static function normalizeHostString ( $ hostString , $ port = 26379 ) { $ hosts = [ ] ; foreach ( explode ( ',' , $ hostString ) as $ host ) { $ host = trim ( $ host ) ; if ( Str :: contains ( $ host , ':' ) ) { $ hosts [ ] = $ host ; } else { $ hosts [ ] = [ 'host' => $ host , 'port' => $ port ] ; } } return $ hosts ; }
Parse a host definition in the form of a string into multiple host
definitions it it specifies more than one host.

@param string $hostString The host definition from a Redis Sentinel
connection
@param int    $port       The port number to use for the resulting host
definitions if the parsed host definition doesn't contain port numbers

@return array One or more host definitions parsed from the provided
host definition
Parse a host definition in the form of a string into multiple host definitions it it specifies more than one host .