From a44aee8c34a78ed93d755224b8afd26d99737311 Mon Sep 17 00:00:00 2001 From: troosan Date: Fri, 30 Nov 2018 22:59:21 +0100 Subject: [PATCH] fix some sonar warnings --- src/PhpWord/Reader/MsDoc.php | 2 ++ src/PhpWord/Shared/Html.php | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/Reader/MsDoc.php b/src/PhpWord/Reader/MsDoc.php index d4945229..187d5b17 100644 --- a/src/PhpWord/Reader/MsDoc.php +++ b/src/PhpWord/Reader/MsDoc.php @@ -2185,6 +2185,8 @@ class MsDoc extends AbstractReader implements ReaderInterface $sprmCPicLocation += $embeddedBlipRH['recLen']; break; + case self::OFFICEARTBLIPPNG: + break; default: // print_r(dechex($embeddedBlipRH['recType'])); } diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 873234de..60fd7e16 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -531,6 +531,7 @@ class Html $styles['bgColor'] = trim($cValue, '#'); break; case 'line-height': + $matches = array(); if (preg_match('/([0-9]+\.?[0-9]*[a-z]+)/', $cValue, $matches)) { $spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::EXACT; $spacing = Converter::cssToTwip($matches[1]) / \PhpOffice\PhpWord\Style\Paragraph::LINE_HEIGHT; @@ -743,8 +744,6 @@ class Html default: return Jc::START; } - - return null; } /**