| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | trait HasInstitution |
||
| 16 | { |
||
| 17 | #[ORM\JoinColumn(onDelete: 'SET NULL')] |
||
| 18 | #[ORM\ManyToOne(targetEntity: Institution::class)] |
||
| 19 | private ?Institution $institution = null; |
||
| 20 | |||
| 21 | abstract public function getSite(): Site; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Get the institution this object belongs to. |
||
| 25 | */ |
||
| 26 | 7 | public function getInstitution(): ?Institution |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Set name of the institution this object belongs to. |
||
| 33 | * |
||
| 34 | * If the institution does not yet exist, it will be created automatically. |
||
| 35 | */ |
||
| 36 | 3 | public function setInstitution(?string $institutionName): void |
|
| 49 |