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

DataErasureTrait::dataErasure()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 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