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

CurlNoSsl::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
crap 2
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
}