Completed
Push — master ( 0d85b2...332a4c )
by Jorge
01:34
created

Response::getContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace AsimovExpress\AdobeConnect\Http;
3
4
class Response
5
{
6
    /**
7
     * Http status code received.
8
     *
9
     * @var int
10
     */
11
    protected $statusCode;
12
13
    /**
14
     * Http response body.
15
     *
16
     * @var string
17
     */
18
    protected $content;
19
20
    /**
21
     * Initilizes an instance of Response.
22
     *
23
     * @param resource $curl_resource Curl resource instance.
24
     * @param string $result Response content.
0 ignored issues
show
Bug introduced by
There is no parameter named $result. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
25
     */
26
    public function __construct($curl_resource, $content)
27
    {
28
        $info = curl_getinfo($curl_resource);
29
        $this->statusCode = $info['http_code'];
30
        $this->content = $content;
31
    }
32
33
    /**
34
     * Http status code received from the server.
35
     *
36
     * @return int
37
     */
38
    public function getStatusCode()
39
    {
40
        return $this->statusCode;
41
    }
42
43
    /**
44
     * Http response body.
45
     *
46
     * @return string
47
     */
48
    public function getContent()
49
    {
50
        return $this->content;
51
    }
52
}
53