Skip to content

Commit f4fac68

Browse files
author
Jui-Nan Lin
committed
fix: style & phpstan
1 parent 7f99efb commit f4fac68

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

phpstan-baseline.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ parameters:
397397

398398
-
399399
message: "#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#"
400-
count: 1
400+
count: 6
401401
path: src/PhpWord/Shared/Html.php
402402

403403
-

src/PhpWord/Shared/Html.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,10 @@ protected static function parseCell($node, $element, &$styles)
478478
}
479479
$beforespan = $node->getAttribute('beforespan');
480480
if (!empty($beforespan)) {
481-
$cellRowContinue = array('vMerge' => 'continue');
481+
$cellRowContinue = ['vMerge' => 'continue'];
482482
$beforecolspan = $node->getAttribute('beforecolspan');
483483

484-
for ($s = 1; $s <= $beforespan; $s++){
484+
for ($s = 1; $s <= $beforespan; ++$s) {
485485
if (!empty($beforecolspan)) {
486486
if (is_numeric($beforecolspan)) {
487487
$beforecolspan = (int) $beforecolspan;
@@ -502,10 +502,10 @@ protected static function parseCell($node, $element, &$styles)
502502

503503
$afterspan = $node->getAttribute('afterspan');
504504
if (!empty($afterspan)) {
505-
$cellRowContinue = array('vMerge' => 'continue');
505+
$cellRowContinue = ['vMerge' => 'continue'];
506506
$aftercolspan = $node->getAttribute('aftercolspan');
507507

508-
for($s = 1; $s <= $afterspan; $s++) {
508+
for ($s = 1; $s <= $afterspan; ++$s) {
509509
if (!empty($aftercolspan)) {
510510
if (is_numeric($aftercolspan)) {
511511
$aftercolspan = (int) $aftercolspan;
@@ -515,7 +515,7 @@ protected static function parseCell($node, $element, &$styles)
515515
}
516516
$cellRowContinue['gridSpan'] = $aftercolspan;
517517
}
518-
$element->addCell(null,$cellRowContinue);
518+
$element->addCell(null, $cellRowContinue);
519519
}
520520
}
521521

0 commit comments

Comments
 (0)