From a53a5d6b5212b6267600ef5ac3f819f1160bc03a Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Thu, 19 Dec 2024 02:39:12 +0000 Subject: [PATCH] fix bug for undefined hoursUsed variable --- src/Entity/Referral.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Entity/Referral.php b/src/Entity/Referral.php index 74a7bce..70f294e 100644 --- a/src/Entity/Referral.php +++ b/src/Entity/Referral.php @@ -67,6 +67,7 @@ class Referral { $this->notes = new ArrayCollection(); $this->present = new ArrayCollection(); + $this->hoursUsed = 0.0; } public function getId(): ?Uuid @@ -194,8 +195,8 @@ class Referral { $this->notes = $notes; $this->hoursUsed = 0.0; - - foreach($this->notes as $note) { + + foreach ($this->notes as $note) { $this->hoursUsed += ($note->calcTimeUsed() / 60); } }