Passed
Push — master ( 71cd79...3a5308 )
by Vincent
02:53 queued 20s
created

MemberNameConstraint   A

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\MemberName;
7
8
/**
9
 * A constraint class to assert that a json object contains at least one member from the provided list.
10
 */
11
class MemberNameConstraint extends AbstractConstraint
12
{
13
    /**
14
     * Class constructor.
15
     *
16
     * @param bool $strict
17
     */
18 27
    public function __construct(bool $strict)
19
    {
20 27
        $this->setConstraint(new MemberName($strict));
21 27
    }
22
}
23