InverseBooleanTransformer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 8 3
1
<?php
2
3
namespace TreeHouse\Feeder\Modifier\Data\Transformer;
4
5
class InverseBooleanTransformer implements TransformerInterface
6
{
7
    /**
8
     * @inheritdoc
9
     */
10 18
    public function transform($value)
11
    {
12 18
        if (is_null($value) || ($value === '')) {
13 4
            return;
14
        }
15
16 14
        return !(bool) $value;
17
    }
18
}
19