Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 28.57% |
Changes | 0 |
1 | <?php |
||
7 | abstract class AbstractRelation implements RelationInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var \Swis\JsonApi\Client\Interfaces\DataInterface|null |
||
11 | */ |
||
12 | protected $included; |
||
13 | |||
14 | /** |
||
15 | * @var bool |
||
16 | */ |
||
17 | protected $omitIncluded = false; |
||
18 | |||
19 | /** |
||
20 | * @return $this |
||
21 | */ |
||
22 | public function dissociate() |
||
23 | { |
||
24 | $this->included = null; |
||
25 | |||
26 | return $this; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param bool $omitIncluded |
||
31 | * |
||
32 | * @return $this |
||
33 | */ |
||
34 | 40 | public function setOmitIncluded(bool $omitIncluded) |
|
35 | { |
||
36 | 40 | $this->omitIncluded = $omitIncluded; |
|
37 | |||
38 | return $this; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function shouldOmitIncluded(): bool |
||
47 | } |
||
48 | } |
||
49 |