diff --git a/src/Domain/Registry/Model/Mesurement.php b/src/Domain/Registry/Model/Mesurement.php index cabadb41563e7bc923331823cb9a0b6bb3c64be1..baf53ede7033173f63e5ed3686460f6d96b23ebf 100644 --- a/src/Domain/Registry/Model/Mesurement.php +++ b/src/Domain/Registry/Model/Mesurement.php @@ -441,6 +441,20 @@ class Mesurement implements LoggableSubject, CollectivityRelated $this->proofs = $proofs; } + public function addProof(Proof $proof): void + { + $this->proofs->add($proof); + $proof->addMesurement($this); + } + + public function removeProof(Proof $proof): void + { + if ($this->proofs->count() && $this->proofs->contains($proof)) { + $this->proofs->removeElement($proof); + } + $proof->removeMesurement($this); + } + public function getAnswerSurveys(): ?iterable { return $this->answerSurveys;