diff --git a/src/Service/Serializer/AssetTypeSerializationHandler/VideoSerializationHandler.php b/src/Service/Serializer/AssetTypeSerializationHandler/VideoSerializationHandler.php index b5f12a47..0ba9897e 100644 --- a/src/Service/Serializer/AssetTypeSerializationHandler/VideoSerializationHandler.php +++ b/src/Service/Serializer/AssetTypeSerializationHandler/VideoSerializationHandler.php @@ -26,6 +26,8 @@ class VideoSerializationHandler extends AbstractHandler { use LoggerAwareTrait; + private const ERROR_SEPARATOR = ' error '; + public function getAdditionalSystemFields(Asset $asset): array { if (!$asset instanceof Video) { @@ -56,7 +58,7 @@ private function getImageThumbnail(Video $video): ?string } catch (Throwable $e) { $this->logger->error('Thumbnail generation failed for video asset: ' . $video->getId() . - ' error ' . + self::ERROR_SEPARATOR . $e->getMessage() ); } @@ -71,7 +73,7 @@ private function getDuration(Video $video): ?float } catch (Throwable $e) { $this->logger->error('Duration extraction failed for video asset: ' . $video->getId() . - ' error ' . + self::ERROR_SEPARATOR . $e->getMessage() ); } @@ -86,7 +88,7 @@ private function getWidth(Video $video): ?int } catch (Throwable $e) { $this->logger->error('Width extraction failed for video asset: ' . $video->getId() . - ' error ' . + self::ERROR_SEPARATOR . $e->getMessage() ); } @@ -101,7 +103,7 @@ private function getHeight(Video $video): ?int } catch (Throwable $e) { $this->logger->error('Height extraction failed for video asset: ' . $video->getId() . - ' error ' . + self::ERROR_SEPARATOR . $e->getMessage() ); }