CurlException::getRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * spindle/httpclient
4
 * @license CC0-1.0 (Public Domain) https://creativecommons.org/publicdomain/zero/1.0/
5
 * @see https://github.com/spindle/spindle-httpclient
6
 */
7
namespace Spindle\HttpClient;
8
9
class CurlException extends \RuntimeException
10
{
11
    private $req;
12
13 2
    function setRequest(Request $req)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
14
    {
15 2
        $this->req = $req;
16 2
    }
17
18 1
    function getRequest()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
19
    {
20 1
        return $this->req;
21
    }
22
23 1
    function getResponse()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
24
    {
25 1
        return $this->req->getResponse();
26
    }
27
}
28