Completed
Pull Request — master (#128)
by Fabien
07:04
created

Profile::getPlugin()   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
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
     * @param string $request
37
     */
38
    public function __construct($plugin, $request)
39
    {
40
        $this->plugin = $plugin;
41
        $this->request = $request;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getPlugin()
48
    {
49
        return $this->plugin;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getRequest()
56
    {
57
        return $this->request;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getResponse()
64
    {
65
        return $this->response;
66
    }
67
68
    /**
69
     * @param string $response
70
     */
71
    public function setResponse($response)
72
    {
73
        $this->response = $response;
74
    }
75
76
    /**
77
     * @return bool
78
     */
79
    public function isFailed()
80
    {
81
        return $this->failed;
82
    }
83
84
    /**
85
     * @param bool $failed
86
     */
87
    public function setFailed($failed)
88
    {
89
        $this->failed = $failed;
90
    }
91
}
92