ContainsOnlyAllowedMembersConstraint   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 1
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\ContainsOnlyAllowedMembers;
7
8
/**
9
 * A constraint class to assert that a json object contains only members from the provided list.
10
 */
11
class ContainsOnlyAllowedMembersConstraint extends AbstractConstraint
12
{
13
    /**
14
     * Class constructor.
15
     *
16
     * @param array<string> $members
17
     */
18 6
    public function __construct(array $members)
19
    {
20 6
        $this->setConstraint(new ContainsOnlyAllowedMembers($members));
21 6
    }
22
}
23