Bolt\Composer\PackageManager::useSsl PHP Method

useSsl() public method

Check if we can/should use SSL/TLS/HTTP2 or HTTP.
public useSsl ( ) : boolean
return boolean
    public function useSsl()
    {
        if ($this->useSsl !== null) {
            return $this->useSsl;
        }
        if (!extension_loaded('openssl')) {
            return $this->useSsl = false;
        }
        if (preg_match('{^http:}i', $this->app['extend.site'])) {
            return $this->useSsl = false;
        }
        try {
            \GuzzleHttp\default_ca_bundle();
            return $this->useSsl = true;
        } catch (\RuntimeException $e) {
            $this->messages[] = $e->getMessage();
            return $this->useSsl = false;
        }
    }