ContainsAtLeastOneConstraint   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace VGirol\JsonApiAssert\Constraint;
5
6
use VGirol\JsonApiStructure\Constraint\ContainsAtLeastOne;
7
8
/**
9
 * A constraint class to assert that a json object contains at least one member from the provided list.
10
 */
11
class ContainsAtLeastOneConstraint extends AbstractConstraint
12
{
13
    /**
14
     * Class constructor.
15
     *
16
     * @param array<string> $members
17
     */
18 12
    public function __construct(array $members)
19
    {
20 12
        $this->setConstraint(new ContainsAtLeastOne($members));
21 12
    }
22
}
23