DelayedCallableEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 28
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCallable() 0 4 1
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