Skip to content

Commit 2f799c2

Browse files
committed
Phpstan False Positives
1 parent 14cad6a commit 2f799c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpWord/Shared/Html.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ protected static function parseInlineStyle($node, &$styles)
180180
$attributes = $node->attributes; // get all the attributes(eg: id, class)
181181

182182
$bidi = false;
183-
$direction = isset($attributes['dir']) ? $attributes['dir']->value : '';
183+
$direction = isset($attributes['dir']) ? $attributes['dir']->value : ''; // @phpstan-ignore-line
184184
if ($direction === 'rtl') {
185185
$bidi = $styles['bidi'] = $styles['rtl'] = true;
186186
$styles['textDirection'] = TextDirection::RLTB;
@@ -550,7 +550,7 @@ protected static function parseTable($node, $element, &$styles)
550550

551551
$attributes = $node->attributes;
552552
if ($attributes->getNamedItem('border') !== null && is_object($newElement->getStyle())) {
553-
$border = (int) $attributes->getNamedItem('border')->value;
553+
$border = (int) $attributes->getNamedItem('border')->value; // @phpstan-ignore-line
554554
$newElement->getStyle()->setBorderSize((int) Converter::pixelToTwip($border));
555555
$newElement->getStyle()->setBorderStyle(($border === 0) ? 'none' : 'single');
556556
}

0 commit comments

Comments
 (0)