Completed
Pull Request — master (#14)
by Johan
03:58 queued 02:02
created

Response::getStatus()   A

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
namespace Artstorm\MonkeyLearn\HttpClient;
4
5
class Response
6
{
7
    /**
8
     * HTTP Status code
9
     *
10
     * @int
11
     */
12
    protected $status;
13
14
    /**
15
     * Contents.
16
     *
17
     * @var string
18
     */
19
    protected $body;
20
21
    /**
22
     * Assign dependencies.
23
     *
24
     * @param int    $status
25
     * @param array  $headers
26
     * @param string $body
27
     */
28 12
    public function __construct($status = 200, array $headers = [], $body = null)
0 ignored issues
show
Unused Code introduced by
The parameter $headers is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30 12
        $this->status = $status;
31 12
        $this->body = $body;
32 12
    }
33
34
    /**
35
     * Get body.
36
     *
37
     * @return string
38
     */
39 8
    public function getBody()
40
    {
41 8
        return $this->body;
42
    }
43
44
    /**
45
     * Get HTTP status code.
46
     *
47
     * @return string
48
     */
49 2
    public function getStatus()
50
    {
51 2
        return $this->status;
52
    }
53
}
54