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