Passed
Pull Request — main (#131)
by Andrey
11:31
created

Empties::notEmptyBoth()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Helldar\Support\Callbacks;
4
5
final class Empties
6
{
7
    public function notEmpty(): callable
8
    {
9
        return static function ($value) {
10
            return ! empty($value);
11
        };
12
    }
13
14
    public function notEmptyBoth(): callable
15
    {
16
        return static function ($value, $key) {
17
            return ! empty($value) && ! empty($key);
18
        };
19
    }
20
}
21