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

Stack::setResponse()   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 1
1
<?php
2
3
namespace Http\HttplugBundle\Collector;
4
5
/**
6
 * @author Fabien Bourigault <[email protected]>
7
 *
8
 * @internal
9
 */
10
final class Stack
11
{
12
    /**
13
     * @var string
14
     */
15
    private $client;
16
17
    /**
18
     * @var Profile[]
19
     */
20
    private $profiles = [];
21
22
    /**
23
     * @var string
24
     */
25
    private $request;
26
27
    /**
28
     * @var string
29
     */
30
    private $response;
31
32
    /**
33
     * @var bool
34
     */
35
    private $failed = false;
36
37
    /**
38
     * @return string
39
     */
40
    public function getClient()
41
    {
42
        return $this->client;
43
    }
44
45
    /**
46
     * @param string $client
47
     */
48
    public function setClient($client)
49
    {
50
        $this->client = $client;
51
    }
52
53
    /**
54
     * @param Profile $profile
55
     */
56
    public function addProfile(Profile $profile)
57
    {
58
        $this->profiles[] = $profile;
59
    }
60
61
    /**
62
     * @return Profile[]
63
     */
64
    public function getProfiles()
65
    {
66
        return $this->profiles;
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    public function getRequest()
73
    {
74
        return $this->request;
75
    }
76
77
    /**
78
     * @param string $request
79
     */
80
    public function setRequest($request)
81
    {
82
        $this->request = $request;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getResponse()
89
    {
90
        return $this->response;
91
    }
92
93
    /**
94
     * @param string $response
95
     */
96
    public function setResponse($response)
97
    {
98
        $this->response = $response;
99
    }
100
101
    /**
102
     * @return bool
103
     */
104
    public function isFailed()
105
    {
106
        return $this->failed;
107
    }
108
109
    /**
110
     * @param bool $failed
111
     */
112
    public function setFailed($failed)
113
    {
114
        $this->failed = $failed;
115
    }
116
}
117