protected function guessPort(string $host, string $scheme): int
    {
        if ($scheme === 'https') {
            return self::DEFAULT_PORT_CLOUD_SERVICE_HTTPS;
        }

        foreach (['saucelabs.com', 'browserstack.com', 'testingbot.com'] as $knownCloudHost) {
            if (mb_strpos($host, $knownCloudHost) !== false) {
                return self::DEFAULT_PORT_CLOUD_SERVICE;
            }
        }

        return self::DEFAULT_PORT;
    }
protected function guessPort(string $host, string $scheme): int
    {
        if ($scheme === 'https') {
            return self::DEFAULT_PORT_CLOUD_SERVICE_HTTPS;
        }

        foreach (['saucelabs.com', 'browserstack.com', 'testingbot.com'] as $knownCloudHost) {
            if (mb_strpos($host, $knownCloudHost) !== false) {
                return self::DEFAULT_PORT_CLOUD_SERVICE;
            }
        }

        return self::DEFAULT_PORT;
    }
protected function guessPort ( string $ host , string $ scheme ) : int { if ( $ scheme === 'https' ) { return self :: DEFAULT_PORT_CLOUD_SERVICE_HTTPS ; } foreach ( [ 'saucelabs.com' , 'browserstack.com' , 'testingbot.com' ] as $ knownCloudHost ) { if ( mb_strpos ( $ host , $ knownCloudHost ) !== false ) { return self :: DEFAULT_PORT_CLOUD_SERVICE ; } } return self :: DEFAULT_PORT ; }
Guess port for given service
Guess port for given service