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

AndOperator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 2
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