Completed
Push — master ( 97f6b5...9ef69c )
by Matze
08:25
created

DelayedCallableEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 4
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
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 DelayedCallableEvent extends MessageQueueEvent
11
{
12
13
    const DELAYED = 'delayed.callable';
14
15
    /**
16
     * @var callable
17
     */
18
    private $callable;
19
20
    /**
21
     * @param callable $callable
22
     */
23
    public function __construct(callable $callable)
24
    {
25
        parent::__construct(self::DELAYED);
26
27
        $this->callable = $callable;
28
    }
29
30
    /**
31
     * @return callable
32
     */
33
    public function getCallable(): callable
34
    {
35
        return $this->callable;
36
    }
37
}
38