Skip to content

Commit 20aac08

Browse files
authored
Merge pull request #4396 from oleibman/stan2lv901
Phpstan Level 9 - Part 1 of Many
2 parents 6ec2cc9 + fca2184 commit 20aac08

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2211
-201
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
1919
### Changed
2020

2121
- Phpstan Version 2. [PR #4384](https://github.com/PHPOffice/PhpSpreadsheet/pull/4384)
22+
- Start migration to Phpstan level 9. [PR #4396](https://github.com/PHPOffice/PhpSpreadsheet/pull/4396)
2223

2324
### Moved
2425

infra/DocumentGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ private static function tableRow(array $lengths, ?array $values = null): string
5252
return rtrim($result, ' ');
5353
}
5454

55+
/** @param array<int,string>|scalar $functionCall */
5556
private static function getPhpSpreadsheetFunctionText(mixed $functionCall): string
5657
{
5758
if (is_string($functionCall)) {

infra/LocaleGenerator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ protected function mapLanguageColumns(Worksheet $translationWorksheet): array
283283
foreach ($cells as $cell) {
284284
if ($this->localeCanBeSupported($translationWorksheet, $cell)) {
285285
$languageNameMap[$cell->getColumn()] = $cell->getValue();
286-
$this->log($cell->getColumn() . ' -> ' . $cell->getValue());
286+
$this->log($cell->getColumn() . ' -> ' . $cell->getValueString());
287287
}
288288
}
289289
}
@@ -316,7 +316,7 @@ protected function mapErrorCodeRows(): void
316316
$cells->setIterateOnlyExistingCells(true);
317317
foreach ($cells as $cell) {
318318
if ($cell->getValue() != '') {
319-
$this->log($cell->getRow() . ' -> ' . $cell->getValue());
319+
$this->log($cell->getRow() . ' -> ' . $cell->getValueString());
320320
$this->errorCodeMap[$cell->getValue()] = $cell->getRow();
321321
}
322322
}
@@ -334,7 +334,7 @@ protected function mapFunctionNameRows(): void
334334
foreach ($cells as $cell) {
335335
if ($this->isFunctionCategoryEntry($cell)) {
336336
if (!empty($cell->getValue())) {
337-
$this->log('CATEGORY: ' . $cell->getValue());
337+
$this->log('CATEGORY: ' . $cell->getValueString());
338338
$this->functionNameMap[$cell->getValue()] = $cell->getRow();
339339
}
340340

@@ -345,7 +345,7 @@ protected function mapFunctionNameRows(): void
345345
$this->log($cell->getRow() . ' -> ' . ($cell->getValue() ? 'TRUE' : 'FALSE'));
346346
$this->functionNameMap[($cell->getValue() ? 'TRUE' : 'FALSE')] = $cell->getRow();
347347
} else {
348-
$this->log($cell->getRow() . ' -> ' . $cell->getValue());
348+
$this->log($cell->getRow() . ' -> ' . $cell->getValueString());
349349
$this->functionNameMap[$cell->getValue()] = $cell->getRow();
350350
}
351351
}

0 commit comments

Comments
 (0)