Completed
Pull Request — master (#18)
by Peter
04:08
created

ConsumeEvent::setResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace TreeHouse\Queue\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use TreeHouse\Queue\Amqp\EnvelopeInterface;
7
8
class ConsumeEvent extends Event
9
{
10
    /**
11
     * @var EnvelopeInterface
12
     */
13
    private $envelope;
14
15
    /**
16
     * @var mixed
17
     */
18
    private $result;
19
20
    /**
21
     * @param EnvelopeInterface $envelope
22
     * @param mixed             $result
23
     */
24
    public function __construct(EnvelopeInterface $envelope, $result = null)
25
    {
26
        $this->envelope = $envelope;
27
        $this->result = $result;
28
    }
29
30
    /**
31
     * @return EnvelopeInterface
32
     */
33
    public function getEnvelope()
34
    {
35
        return $this->envelope;
36
    }
37
38
    /**
39
     * @param mixed $result
40
     */
41
    public function setResult($result)
42
    {
43
        $this->result = $result;
44
    }
45
46
    /**
47
     * @return mixed
48
     */
49
    public function getResult()
50
    {
51
        return $this->result;
52
    }
53
}
54