From b222bc0c2efa3ab0474eb7dd8e7d5c2ffdd03168 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 14 Nov 2019 23:44:01 +0100 Subject: [PATCH] Rename end field in length --- Entity/Slot.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Entity/Slot.php b/Entity/Slot.php index 03bfd3f..12a0aca 100644 --- a/Entity/Slot.php +++ b/Entity/Slot.php @@ -20,7 +20,7 @@ class Slot /** * @var \DateTime */ - private $end; + private $length; /** * @var \DateTime @@ -80,27 +80,27 @@ class Slot } /** - * Set end + * Set length * - * @param \DateTime $end + * @param \DateTime $length * * @return Slot */ - public function setEnd($end) + public function setLength($length) { - $this->end = $end; + $this->length = $length; return $this; } /** - * Get end + * Get length * * @return \DateTime */ - public function getEnd() + public function getLength() { - return $this->end; + return $this->length; } /** @@ -186,6 +186,7 @@ class Slot } public function getTitle() { - return $this->begin->format('H:i').'-'.$this->end->format('H:i'); + //TODO: replace that with computed time + return $this->begin->format('H:i').'+'.$this->length->format('H:i'); } } -- 2.41.0