Passed
Pull Request — master (#22)
by
unknown
02:21
created

AbstractOperator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getChecker() 0 3 1
1
<?php
2
/**
3
 * @author Anton Lytkin <[email protected]>
4
 */
5
6
namespace WS\Utils\Collections\Functions\Expression\Operator;
7
8
abstract class AbstractOperator
9
{
10
    protected $checker;
11
12
    public function __construct(callable $checker)
13
    {
14
        $this->checker = $checker;
15
    }
16
17
    public function getChecker(): callable
18
    {
19
        return $this->checker;
20
    }
21
22
    abstract public function __invoke(bool $operand, $item): bool;
23
24
}
25