Criteria   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A and() 0 3 1
A or() 0 3 1
A not() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace BrenoRoosevelt\PhpAttributes\Specification;
5
6
use BrenoRoosevelt\PhpAttributes\Specification;
7
8
class Criteria
9
{
10
    public static function and(Specification ...$specifications): Specification
11
    {
12
        return new AllOf(...$specifications);
13
    }
14
15
    public static function or(Specification ...$specifications): Specification
16
    {
17
        return new AnyOf(...$specifications);
18
    }
19
20
    public static function not(Specification ...$specifications): Specification
21
    {
22
        return new Not(...$specifications);
23
    }
24
}
25