Completed
Pull Request — master (#128)
by Fabien
10:19 queued 08:15
created

Profile::getRequest()   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 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Http\HttplugBundle\Collector;
4
5
/**
6
 * @author Fabien Bourigault <[email protected]>
7
 *
8
 * @internal
9
 */
10
final class Profile
11
{
12
    /**
13
     * @var string
14
     */
15
    private $plugin;
16
17
    /**
18
     * @var string
19
     */
20
    private $request;
21
22
    /**
23
     * @var string
24
     */
25
    private $response;
26
27
    /**
28
     * @var bool
29
     */
30
    private $failed = false;
31
32
    /**
33
     * @param string $plugin
34
     * @param string $request
35
     */
36 4
    public function __construct($plugin, $request)
37
    {
38 4
        $this->plugin = $plugin;
39 4
        $this->request = $request;
40 4
    }
41
42
    /**
43
     * @return string
44
     */
45 1
    public function getPlugin()
46
    {
47 1
        return $this->plugin;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 1
    public function getRequest()
54
    {
55 1
        return $this->request;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 1
    public function getResponse()
62
    {
63 1
        return $this->response;
64
    }
65
66
    /**
67
     * @param string $response
68
     */
69 2
    public function setResponse($response)
70
    {
71 2
        $this->response = $response;
72 2
    }
73
74
    /**
75
     * @return bool
76
     */
77
    public function isFailed()
78
    {
79
        return $this->failed;
80
    }
81
82
    /**
83
     * @param bool $failed
84
     */
85 1
    public function setFailed($failed)
86
    {
87 1
        $this->failed = $failed;
88 1
    }
89
}
90