Passed
Push — master ( 18b32f...fa2b73 )
by Jens
08:15
created

DataErasureTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A dataErasure() 0 7 2
1
<?php
2
/**
3
 */
4
5
namespace Commercetools\Core\Request;
6
7
use Commercetools\Core\Request\Query\Parameter;
8
use Commercetools\Core\Request\Query\ParameterInterface;
9
10
/**
11
 * @package Commercetools\Core\Request
12
 */
13
trait DataErasureTrait
14
{
15
    /**
16
     * @param ParameterInterface $param
17
     * @return $this
18
     */
19
    abstract public function addParamObject(ParameterInterface $param);
20
21
    /**
22
     * @param bool $dataErasure
23
     * @return $this
24
     */
25 14
    public function dataErasure($dataErasure)
26
    {
27 14
        if (is_bool($dataErasure)) {
0 ignored issues
show
introduced by
The condition is_bool($dataErasure) is always true.
Loading history...
28 14
            $this->addParamObject(new Parameter('dataErasure', $dataErasure));
29
        }
30
31 14
        return $this;
32
    }
33
}
34