| Total Complexity | 8 |
| Total Lines | 86 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class Relation |
||
| 13 | { |
||
| 14 | /** @var string */ |
||
| 15 | private $type; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | private $target; |
||
| 19 | |||
| 20 | /** @var array */ |
||
| 21 | private $options = []; |
||
| 22 | |||
| 23 | /** @var bool */ |
||
| 24 | private $inverse = false; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $type |
||
| 28 | * @return Relation |
||
| 29 | */ |
||
| 30 | public function setType(string $type): Relation |
||
| 31 | { |
||
| 32 | $this->type = $type; |
||
| 33 | |||
| 34 | return $this; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getType(): string |
||
| 41 | { |
||
| 42 | return $this->type; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $target |
||
| 47 | * @return Relation |
||
| 48 | */ |
||
| 49 | public function setTarget(string $target): Relation |
||
| 50 | { |
||
| 51 | $this->target = $target; |
||
| 52 | |||
| 53 | return $this; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function getTarget(): string |
||
| 60 | { |
||
| 61 | return $this->target; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param array $options |
||
| 66 | * @return Relation |
||
| 67 | */ |
||
| 68 | public function setOptions(array $options): Relation |
||
| 69 | { |
||
| 70 | $this->options = $options; |
||
| 71 | return $this; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return array |
||
| 76 | */ |
||
| 77 | public function getOptions(): array |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param bool $inverse |
||
| 84 | * @return Relation |
||
| 85 | */ |
||
| 86 | public function setInverse(bool $inverse): Relation |
||
| 90 | } |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @return bool |
||
| 94 | */ |
||
| 95 | public function isInverse(): bool |
||
| 98 | } |
||
| 99 | } |