Completed
Pull Request — master (#19)
by Peter
07:59
created

ConsumeEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

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
ccs 11
cts 11
cp 1
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 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