Completed
Pull Request — master (#128)
by Fabien
07:21 queued 05:28
created

Profile::setFirst()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Http\HttplugBundle\Collector;
4
5
use Http\Client\Common\Plugin;
6
use Http\Client\Exception;
7
use Psr\Http\Message\RequestInterface;
8
use Psr\Http\Message\ResponseInterface;
9
10
class Profile
11
{
12
    /**
13
     * @var Plugin
14
     */
15
    private $plugin;
16
17
    /**
18
     * @var RequestInterface
19
     */
20
    private $request;
21
22
    /**
23
     * @var ResponseInterface
24
     */
25
    private $response;
26
27
    /**
28
     * @var Exception
29
     */
30
    private $exception;
31
32
    /**
33
     * @var bool
34
     */
35
    private $first;
36
37
    /**
38
     * @param Plugin           $plugin
39
     * @param RequestInterface $request
40
     */
41
    public function __construct(Plugin $plugin, RequestInterface $request)
42
    {
43
        $this->plugin = $plugin;
44
        $this->request = $request;
45
        $this->first = false;
46
    }
47
48
    /**
49
     * @return Plugin
50
     */
51
    public function getPlugin()
52
    {
53
        return $this->plugin;
54
    }
55
56
    /**
57
     * @return RequestInterface
58
     */
59
    public function getRequest()
60
    {
61
        return $this->request;
62
    }
63
64
    /**
65
     * @return ResponseInterface
66
     */
67
    public function getResponse()
68
    {
69
        return $this->response;
70
    }
71
72
    /**
73
     * @param ResponseInterface $response
74
     */
75
    public function setResponse(ResponseInterface $response)
76
    {
77
        $this->response = $response;
78
    }
79
80
    /**
81
     * @return Exception
82
     */
83
    public function getException()
84
    {
85
        return $this->exception;
86
    }
87
88
    /**
89
     * @param Exception $exception
90
     */
91
    public function setException(Exception $exception)
92
    {
93
        $this->exception = $exception;
94
    }
95
96
    /**
97
     * @return bool
98
     */
99
    public function getFirst()
100
    {
101
        return $this->first;
102
    }
103
104
    /**
105
     * @param $first
106
     */
107
    public function setFirst($first)
108
    {
109
        $this->first = $first;
110
    }
111
}
112