CallbackHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 2
1
<?php
2
3
namespace AsyncPHP\Doorman\Handler;
4
5
use AsyncPHP\Doorman\Handler;
6
use AsyncPHP\Doorman\Task;
7
8
class CallbackHandler implements Handler
9
{
10
    /**
11
     * @inheritdoc
12
     *
13
     * @param Task $task
14
     */
15
    public function handle(Task $task)
16
    {
17
        $data = $task->getData();
18
19
        if (isset($data["closure"])) {
20
            $closure = $data["closure"];
21
            $closure($this, $task);
22
        }
23
    }
24
}
25