Passed
Pull Request — master (#288)
by Alexander
04:53 queued 02:29
created

SkipOnEmpty::__invoke()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 3

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 3
nc 3
nop 1
crap 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\SkipOnEmptyCallback;
6
7
final class SkipOnEmpty
8
{
9 8
    public function __invoke(mixed $value): bool
10
    {
11 8
        return $value === null || $value === [] || $value === '';
12
    }
13
}
14