Completed
Push — master ( 7447f5...b893a1 )
by Fabien
04:06
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
 * A Profile holds representation of what goes in an plugin (request) and what goes out (response and failure state).
7
 *
8
 * @author Fabien Bourigault <[email protected]>
9
 *
10
 * @internal
11
 */
12
final class Profile
13
{
14
    /**
15
     * @var string
16
     */
17
    private $plugin;
18
19
    /**
20
     * @var string
21
     */
22
    private $request;
23
24
    /**
25
     * @var string
26
     */
27
    private $response;
28
29
    /**
30
     * @var bool
31
     */
32
    private $failed = false;
33
34
    /**
35
     * @param string $plugin
36
     */
37 8
    public function __construct($plugin)
38
    {
39 8
        $this->plugin = $plugin;
40 8
    }
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
     * @param string $request
60
     */
61 7
    public function setRequest($request)
62
    {
63 7
        $this->request = $request;
64 7
    }
65
66
    /**
67
     * @return string
68
     */
69 1
    public function getResponse()
70
    {
71 1
        return $this->response;
72
    }
73
74
    /**
75
     * @param string $response
76
     */
77 8
    public function setResponse($response)
78
    {
79 8
        $this->response = $response;
80 8
    }
81
82
    /**
83
     * @return bool
84
     */
85
    public function isFailed()
86
    {
87
        return $this->failed;
88
    }
89
90
    /**
91
     * @param bool $failed
92
     */
93 2
    public function setFailed($failed)
94
    {
95 2
        $this->failed = $failed;
96 2
    }
97
}
98