Request::getBody()   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
namespace Artstorm\MonkeyLearn\HttpClient;
4
5
class Request
6
{
7
    /**
8
     * Method.
9
     *
10
     * @var string
11
     */
12
    protected $method;
13
14
    /**
15
     * Path.
16
     *
17
     * @var string
18
     */
19
    protected $path;
20
21
    /**
22
     * Method.
23
     *
24
     * @var array
25
     */
26
    protected $headers;
27
28
    /**
29
     * Body.
30
     *
31
     * @var string
32
     */
33
    protected $body;
34
35
    /**
36
     * Assign dependencie.
37
     *
38
     * @param string $method
39
     * @param string $path
40
     * @param array  $headers
41
     * @param string $body
42
     */
43 18
    public function __construct($method, $path, array $headers = [], $body = '')
44
    {
45 18
        $this->method = $method;
46 18
        $this->path = $path;
47 18
        $this->headers = $headers;
48 18
        $this->body = $body;
49 18
    }
50
51
    /**
52
     * Get path.
53
     *
54
     * @return string
55
     */
56 6
    public function getPath()
57
    {
58 6
        return $this->path;
59
    }
60
61
    /**
62
     * Get body.
63
     *
64
     * @return string
65
     */
66 6
    public function getBody()
67
    {
68 6
        return $this->body;
69
    }
70
71
    /**
72
     * Get headers.
73
     *
74
     * @return array
75
     */
76 6
    public function getHeaders()
77
    {
78 6
        return $this->headers;
79
    }
80
}
81