Skip to content

Commit 7cc6e4e

Browse files
authored
Merge pull request #4872 from oleibman/upgrades
Combine Dependabot Changes
2 parents d5cdc29 + 5c8c206 commit 7cc6e4e

7 files changed

Lines changed: 126 additions & 48 deletions

File tree

composer.lock

Lines changed: 110 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/Engineering/Convert-Online.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
$toUnit = $post['toUnit'];
8787
if (!is_numeric($quantity)) {
8888
$helper->log('Quantity is not numeric');
89-
} elseif (isset($units[$post['category']][$fromUnit], $units[$post['category']][$toUnit])) {
89+
} elseif (isset($post['category'], $units[$post['category']][$fromUnit], $units[$post['category']][$toUnit])) {
9090
/** @var float|string */
9191
$result = ConvertUOM::CONVERT($quantity, $fromUnit, $toUnit);
9292

src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ public static function compareKeys(): bool
192192
$retVal = true;
193193
$array = array_merge(array_keys(self::SINGLE_OPERATORS), array_keys(self::RANGE_OPERATORS));
194194
foreach ($array as $value) {
195-
$retVal = $retVal && in_array($value, self::MAGIC_OPERATIONS, true);
195+
// PhpStan is correct about next statement, but we want to test anyhow
196+
$retVal = $retVal && in_array($value, self::MAGIC_OPERATIONS, true); // @phpstan-ignore-line
196197
}
197198

198199
return $retVal;

src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ public static function compareKeys(): bool
169169
$retVal = true;
170170
$array = array_keys(self::OPERATORS);
171171
foreach ($array as $value) {
172-
$retVal = $retVal && in_array($value, self::MAGIC_OPERATIONS, true);
172+
// PhpStan is correct about next statement, but we want to test anyhow
173+
$retVal = $retVal && in_array($value, self::MAGIC_OPERATIONS, true); // @phpstan-ignore-line
173174
}
174175

175176
return $retVal;

src/PhpSpreadsheet/Worksheet/Worksheet.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ public function calculateColumnWidths(): static
796796
$this->activePane = $holdActivePane;
797797
}
798798
if ($activeSheet !== null && $activeSheet >= 0) {
799-
$this->getParent()?->setActiveSheetIndex($activeSheet);
799+
// Not sure what PhpStan doesn't like about next stmt
800+
$this->getParent()?->setActiveSheetIndex($activeSheet); // @phpstan-ignore-line
800801
}
801802
$this->setSelectedCells($selectedCells);
802803

tests/PhpSpreadsheetTests/Chart/ChartCloneTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ public function testCloneSheetWithTrendLines(): void
154154
self::assertCount(1, $oldLabels);
155155
self::assertCount(3, $oldLabels[0]->getTrendLines());
156156

157-
$plotGroup = $chart->getPlotArea()?->getPlotGroup();
158-
self::assertNotNull($plotGroup);
157+
$plotGroup = $chart->getPlotArea()->getPlotGroup();
159158
self::assertCount(1, $plotGroup);
160159
$plotLabels = $plotGroup[0]->getPlotLabels();
161160
self::assertCount(1, $plotLabels);

tests/PhpSpreadsheetTests/Writer/Html/RepeatedRowsTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ public function testWriteRepeats(): void
3131
$divs = $body->getElementsByTagName('div');
3232
$tbl = $divs->item(0)?->getElementsByTagName('table');
3333
self::assertSame('', $tbl?->item(0)?->getAttribute('style'));
34-
$thd = $divs->item(0)?->getElementsByTagName('thead');
34+
$thd = $divs->item(0)->getElementsByTagName('thead');
3535
self::assertCount(1, $thd);
36-
$trw = $thd?->item(0)?->getElementsByTagName('tr');
36+
$trw = $thd->item(0)?->getElementsByTagName('tr');
3737
self::assertCount(2, $trw);
38-
$tbd = $divs->item(0)?->getElementsByTagName('tbody');
38+
$tbd = $divs->item(0)->getElementsByTagName('tbody');
3939
self::assertCount(1, $tbd);
40-
$trw = $tbd?->item(0)?->getElementsByTagName('tr');
40+
$trw = $tbd->item(0)?->getElementsByTagName('tr');
4141
self::assertCount(98, $trw);
4242

4343
$rls = $this->writeAndReload($spreadsheet, 'Html');
@@ -100,13 +100,13 @@ public function testWriteRepeatsInline(): void
100100
$divs = $body->getElementsByTagName('div');
101101
$tbl = $divs->item(0)?->getElementsByTagName('table');
102102
self::assertSame('border-collapse:collapse', $tbl?->item(0)?->getAttribute('style'));
103-
$thd = $divs->item(0)?->getElementsByTagName('thead');
103+
$thd = $divs->item(0)->getElementsByTagName('thead');
104104
self::assertCount(1, $thd);
105-
$trw = $thd?->item(0)?->getElementsByTagName('tr');
105+
$trw = $thd->item(0)?->getElementsByTagName('tr');
106106
self::assertCount(2, $trw);
107-
$tbd = $divs->item(0)?->getElementsByTagName('tbody');
107+
$tbd = $divs->item(0)->getElementsByTagName('tbody');
108108
self::assertCount(1, $tbd);
109-
$trw = $tbd?->item(0)?->getElementsByTagName('tr');
109+
$trw = $tbd->item(0)?->getElementsByTagName('tr');
110110
self::assertCount(98, $trw);
111111

112112
$rls = $this->writeAndReload($spreadsheet, 'Html');

0 commit comments

Comments
 (0)