AssertDecorator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDecoratorFqcn() 0 3 1
A decorate() 0 8 2
1
<?php
2
3
namespace Er1z\FakeMock\Decorator;
4
5
use Er1z\FakeMock\Metadata\FieldMetadata;
6
7
class AssertDecorator extends DecoratorAbstract
8
{
9 33
    public function decorate(
10
        &$value, FieldMetadata $field, ?string $group = null
11
    ): bool {
12 33
        if (!$field->configuration->satisfyAssertsConditions) {
13 3
            return false;
14
        }
15
16 30
        return parent::decorate($value, $field, $group);
17
    }
18
19 9
    protected function getDecoratorFqcn($simpleClassName)
20
    {
21 9
        return sprintf('Er1z\\FakeMock\\Decorator\\AssertDecorator\\%s', $simpleClassName);
22
    }
23
}
24