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

OrOperator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 10
ccs 3
cts 5
cp 0.6
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 OrOperator extends AbstractOperator
9
{
10
11 1
    public function __invoke(bool $operand, $item): bool
12
    {
13 1
        if ($operand) {
14 1
            return true;
15
        }
16
        $checker = $this->checker;
17
        return $checker($item);
18
    }
19
20
}
21