Skip to content

Commit a44aee8

Browse files
committed
fix some sonar warnings
1 parent 6a75946 commit a44aee8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/PhpWord/Reader/MsDoc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,6 +2185,8 @@ private function readPrl($data, $pos, $cbNum)
21852185

21862186
$sprmCPicLocation += $embeddedBlipRH['recLen'];
21872187
break;
2188+
case self::OFFICEARTBLIPPNG:
2189+
break;
21882190
default:
21892191
// print_r(dechex($embeddedBlipRH['recType']));
21902192
}

src/PhpWord/Shared/Html.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ private static function parseStyle($attribute, $styles)
531531
$styles['bgColor'] = trim($cValue, '#');
532532
break;
533533
case 'line-height':
534+
$matches = array();
534535
if (preg_match('/([0-9]+\.?[0-9]*[a-z]+)/', $cValue, $matches)) {
535536
$spacingLineRule = \PhpOffice\PhpWord\SimpleType\LineSpacingRule::EXACT;
536537
$spacing = Converter::cssToTwip($matches[1]) / \PhpOffice\PhpWord\Style\Paragraph::LINE_HEIGHT;
@@ -743,8 +744,6 @@ private static function mapAlign($cssAlignment)
743744
default:
744745
return Jc::START;
745746
}
746-
747-
return null;
748747
}
749748

750749
/**

0 commit comments

Comments
 (0)