Completed
Push — master ( e22550...e221c0 )
by Matze
03:25
created

DelayedEvent::getTimestamp()   A

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 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
ccs 0
cts 0
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace BrainExe\Core\EventDispatcher;
4
5
use BrainExe\Core\MessageQueue\Event\MessageQueueEvent;
6
7
/**
8
 * @api
9
 */
10
class DelayedEvent extends MessageQueueEvent
11
{
12
13
    const DELAYED = 'message_queue.delayed';
14
15
    /**
16
     * @var int
17
     */
18
    public $timestamp;
19
20
    /**
21
     * @param AbstractEvent $event
22
     * @param int $timestamp
23
     */
24 2
    public function __construct(AbstractEvent $event, int $timestamp)
25
    {
26 2
        parent::__construct(self::DELAYED);
27 2
        $this->event      = $event;
28 2
        $this->timestamp  = $timestamp;
29 2
    }
30
31
    /**
32
     * @return int
33
     */
34
    public function getTimestamp()
35
    {
36
        return $this->timestamp;
37
    }
38
}
39