Completed
Push — master ( 4248bc...046bb8 )
by Peter
7s
created

ConsumeEvent::getEnvelope()   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 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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 3
    public function __construct(EnvelopeInterface $envelope, $result = null)
25
    {
26 3
        $this->envelope = $envelope;
27 3
        $this->result = $result;
28 3
    }
29
30
    /**
31
     * @return EnvelopeInterface
32
     */
33 1
    public function getEnvelope()
34
    {
35 1
        return $this->envelope;
36
    }
37
38
    /**
39
     * @param mixed $result
40
     */
41 1
    public function setResult($result)
42
    {
43 1
        $this->result = $result;
44 1
    }
45
46
    /**
47
     * @return mixed
48
     */
49 1
    public function getResult()
50
    {
51 1
        return $this->result;
52
    }
53
}
54