Passed
Push — master ( defd4e...35ff3b )
by Pol
06:10 queued 03:00
created

Combinator::with()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 9
ccs 5
cts 5
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace loophp\combinator;
6
7
use Closure;
8
use loophp\combinator\Contract\Combinator as CombinatorInterface;
9
10
abstract class Combinator implements CombinatorInterface
11
{
12 54
    final public function __construct()
13
    {
14 54
    }
15
16
    abstract public function __invoke(): Closure;
17
18 54
    public static function of(): Closure
19
    {
20 54
        return (new static())->__invoke();
21
    }
22
}
23