Completed
Pull Request — master (#17)
by
unknown
08:54
created

CurlNoSsl   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace Fhp\Adapter;
4
5
use Fhp\Adapter\Exception\AdapterException;
6
7
class CurlNoSsl extends Curl
8
{
9
10
    /**
11
     * Curl constructor.
12
     *
13
     * @param string $host
14
     * @param int    $port
15
     *
16
     * @throws AdapterException
17
     */
18
    public function __construct($host, $port)
19
    {
20
21
        parent::__construct($host, $port);
22
23
        curl_setopt($this->curlHandle, CURLOPT_SSLVERSION, 0);
24
        curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, false);
25
        curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYHOST, 0);
26
27
    }
28
}