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

Combinator::of()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
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