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

AndOperator::__invoke()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 10
cc 2
nc 2
nop 2
crap 6
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
    public function __invoke(bool $operand, $item): bool
12
    {
13
        if (!$operand) {
14
            return false;
15
        }
16
        $checker = $this->checker;
17
        return $checker($item);
18
    }
19
20
}
21