| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class MorphToRelation extends AbstractOneRelation |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * {@inheritdoc} |
||
| 11 | */ |
||
| 12 | 35 | public function associate(DataInterface $included) |
|
| 13 | { |
||
| 14 | 35 | parent::associate($included); |
|
| 15 | |||
| 16 | /* @var \Swis\JsonApi\Client\Interfaces\ItemInterface $included */ |
||
| 17 | |||
| 18 | 35 | $this->type = $included->getType(); |
|
| 19 | |||
| 20 | 35 | return $this; |
|
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * {@inheritdoc} |
||
| 25 | */ |
||
| 26 | 5 | public function dissociate() |
|
| 33 | } |
||
| 34 | } |
||
| 35 |