Passed
Push — master ( 6f2c28...9e5d31 )
by Maxim
02:59 queued 11s
created

AbstractOperator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
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 1
    public function getChecker(): callable
18
    {
19 1
        return $this->checker;
20
    }
21
22
    abstract public function __invoke(bool $operand, $item): bool;
23
24
}
25