NotSpecification   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isSatisfiedBy() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Larium\Specification;
6
7
class NotSpecification extends LeafSpecification
8
{
9
    private $wrapped;
10
11 1
    public function __construct(Specification $x)
12
    {
13 1
        $this->wrapped = $x;
14 1
    }
15
16 1
    public function isSatisfiedBy(Candidate $candidate): bool
17
    {
18 1
        return !$this->wrapped->isSatisfiedBy($candidate);
19
    }
20
}
21