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

ConsumeEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 46
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getEnvelope() 0 4 1
A setResult() 0 4 1
A getResult() 0 4 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