| Total Complexity | 4 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class AbstractRelation implements RelationInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $type; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var bool |
||
| 16 | */ |
||
| 17 | protected $omitIncluded = false; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param string $type |
||
| 21 | * |
||
| 22 | * @return $this |
||
| 23 | */ |
||
| 24 | 50 | public function setType(string $type) |
|
| 25 | { |
||
| 26 | 50 | $this->type = $type; |
|
| 27 | |||
| 28 | 50 | return $this; |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string|null |
||
| 33 | */ |
||
| 34 | 35 | public function getType(): string |
|
| 35 | { |
||
| 36 | 35 | return $this->type; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param bool $omitIncluded |
||
| 41 | * |
||
| 42 | * @return $this |
||
| 43 | */ |
||
| 44 | public function setOmitIncluded(bool $omitIncluded) |
||
| 45 | { |
||
| 46 | $this->omitIncluded = $omitIncluded; |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | public function shouldOmitIncluded(): bool |
||
| 57 | } |
||
| 58 | } |
||
| 59 |