PreHandleMessage::__construct()   A
last analyzed

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 Happyr\Mq2phpBundle\Event;
4
5
use SimpleBus\Serialization\Envelope\Envelope;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * A message has been pulled from the queue and we are just about to start handling that message.
10
 *
11
 * @author Tobias Nyholm <[email protected]>
12
 */
13
class PreHandleMessage extends Event
14
{
15
    const NAME = 'happyr.mq2php.pre_handle_message';
16
17
    /**
18
     * @var Envelope
19
     */
20
    private $envelope;
21
22
    /**
23
     * @param Envelope $envelope
24
     */
25
    public function __construct(Envelope $envelope)
26
    {
27
        $this->envelope = $envelope;
28
    }
29
30
    /**
31
     * @return Envelope
32
     */
33
    public function getEnvelope()
34
    {
35
        return $this->envelope;
36
    }
37
}
38