| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class HasOneRelation extends AbstractOneRelation |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \Swis\JsonApi\Client\Interfaces\ItemInterface |
||
| 12 | */ |
||
| 13 | protected $parentItem; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param string $type |
||
| 17 | * @param \Swis\JsonApi\Client\Interfaces\ItemInterface $item |
||
| 18 | */ |
||
| 19 | 30 | public function __construct(string $type, ItemInterface $item) |
|
| 23 | 30 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param \Swis\JsonApi\Client\Interfaces\DataInterface $included |
||
| 27 | * |
||
| 28 | * @throws \InvalidArgumentException |
||
| 29 | * |
||
| 30 | * @return $this |
||
| 31 | */ |
||
| 32 | 25 | public function associate(DataInterface $included) |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return $this |
||
| 44 | */ |
||
| 45 | public function dissociate() |
||
| 55 |