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