Passed
Push — master ( 685e2a...9f4f72 )
by Iman
03:13
created

ResponderFactory::abort()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 2
b 1
f 0
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Imanghafoori\HeyMan\Reactions;
4
5
use Imanghafoori\HeyMan\Plugins\Reactions\Nothing;
6
7
final class ResponderFactory
8
{
9 102
    public function make()
10
    {
11 102
        $chain = resolve('heyman.chain');
12 102
        $method = $chain->get('responseType') ?? [Nothing::class, 'nothing'];
13 102
        $data = $chain->get('data') ?? [];
14
15 102
        return call_user_func($method, ...$data);
16
    }
17
}
18