CURLException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace mpyw\Co;
4
5
class CURLException extends \RuntimeException
6
{
7
    private $handle;
8
9
    /**
10
     *  Constructor.
11
     * @param string   $message
12
     * @param int      $code
13
     * @param resource $handle
14
     */
15 8
    public function __construct($message, $code, $handle)
16 8
    {
17 8
        parent::__construct($message, $code);
18 8
        $this->handle = $handle;
19 8
    }
20
21
    /**
22
     * Get cURL handle.
23
     * @return resource $handle
24
     */
25 1
    public function getHandle()
26 1
    {
27 1
        return $this->handle;
28
    }
29
}
30