From 5da993d598499bc30c73bdfac1e9381f254ac6c9 Mon Sep 17 00:00:00 2001 From: Opheugene Date: Fri, 13 Sep 2024 13:00:57 +0200 Subject: [PATCH 1/2] Add Item transcription --- src/Bot/Model/Entity/Message/Item.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Bot/Model/Entity/Message/Item.php b/src/Bot/Model/Entity/Message/Item.php index 8e1df1b..0c04b46 100644 --- a/src/Bot/Model/Entity/Message/Item.php +++ b/src/Bot/Model/Entity/Message/Item.php @@ -49,6 +49,15 @@ class Item implements ModelInterface */ private $caption; + /** + * @var string $transcription + * + * @Type("string") + * @Accessor(getter="getTranscription",setter="setTranscription") + * @SkipWhenEmpty() + */ + private $transcription; + /** * @return string|null */ @@ -96,4 +105,20 @@ class Item implements ModelInterface { $this->caption = $caption; } + + /** + * @return string|null + */ + public function getTranscription() + { + return $this->transcription; + } + + /** + * @param string $transcription + */ + public function setTranscription(string $transcription) + { + $this->transcription = $transcription; + } } From b1fd78d2b5d4f85441fd11feec050d150754130f Mon Sep 17 00:00:00 2001 From: Opheugene Date: Fri, 13 Sep 2024 13:06:04 +0200 Subject: [PATCH 2/2] fix phpstan --- src/Bot/Model/Entity/Message/Item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bot/Model/Entity/Message/Item.php b/src/Bot/Model/Entity/Message/Item.php index 0c04b46..8bb14bb 100644 --- a/src/Bot/Model/Entity/Message/Item.php +++ b/src/Bot/Model/Entity/Message/Item.php @@ -109,7 +109,7 @@ class Item implements ModelInterface /** * @return string|null */ - public function getTranscription() + public function getTranscription(): ?string { return $this->transcription; } @@ -117,7 +117,7 @@ class Item implements ModelInterface /** * @param string $transcription */ - public function setTranscription(string $transcription) + public function setTranscription(string $transcription): void { $this->transcription = $transcription; }