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

AndOperator::__invoke()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
ccs 4
cts 5
cp 0.8
rs 10
cc 2
nc 2
nop 2
crap 2.032
1
<?php
2
/**
3
 * @author Anton Lytkin <[email protected]>
4
 */
5
6
namespace WS\Utils\Collections\Functions\Expression\Operator;
7
8
class AndOperator extends AbstractOperator
9
{
10
11 1
    public function __invoke(bool $operand, $item): bool
12
    {
13 1
        if (!$operand) {
14
            return false;
15
        }
16 1
        $checker = $this->checker;
17 1
        return $checker($item);
18
    }
19
20
}
21