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