From c160471df885ef5927ee0c8063f45f086dc7c829 Mon Sep 17 00:00:00 2001 From: rskrzypczak Date: Mon, 9 Sep 2024 13:46:22 +0200 Subject: [PATCH] Fix 'Creation of dynamic property' for images element (PHP8) (#48) --- lib/Objects/Font.php | 4 ++-- lib/Objects/ImageStream.php | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Objects/Font.php b/lib/Objects/Font.php index 1cd3196..548a92e 100644 --- a/lib/Objects/Font.php +++ b/lib/Objects/Font.php @@ -388,7 +388,7 @@ public function setSize(NumericValue $size) /** * Get font size. * - * @return string + * @return NumericValue */ public function getSize(): NumericValue { @@ -650,7 +650,7 @@ public function getFontFileName() return $this->fontDir . $match; } if (\defined('ROOT_DIRECTORY')) { - $path = ROOT_DIRECTORY; + $path = \ROOT_DIRECTORY; $path .= \DIRECTORY_SEPARATOR . 'public_html'; $path .= \DIRECTORY_SEPARATOR . 'vendor'; $path .= \DIRECTORY_SEPARATOR . 'yetiforce'; diff --git a/lib/Objects/ImageStream.php b/lib/Objects/ImageStream.php index 00871a0..025e66a 100644 --- a/lib/Objects/ImageStream.php +++ b/lib/Objects/ImageStream.php @@ -46,10 +46,18 @@ class ImageStream extends \YetiForcePDF\Objects\Resource * @var string image original width */ protected $width = '0'; + + /** @var string Display width */ + protected $displayWidth = ''; + /** * @var string image original height */ protected $height = '0'; + + /** @var string Display height */ + protected $displayHeight = ''; + /** * Width / Height ratio. *