ResponderFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 10
Bugs 4 Features 0
Metric Value
eloc 5
c 10
b 4
f 0
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 7 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\Reactions;
4
5
use Imanghafoori\HeyMan\Plugins\Reactions\Nothing;
6
7
final class ResponderFactory
8
{
9 106
    public function make()
10
    {
11 106
        $chain = resolve('heyman.chain');
12 106
        $method = $chain->get('responseType') ?? [Nothing::class, 'nothing'];
13 106
        $data = $chain->get('data') ?? [];
14
15 106
        return call_user_func($method, ...$data);
16
    }
17
}
18