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

Combinator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A of() 0 3 1
A __construct() 0 2 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