Reset phpstan to level 8... there's too many issues working with mixed and needing to cast to a specific type like string; but the alternative for maintaining exact types is a unnecessar extra of code for explicit handling of casting with checks that we don't need when we know datatypes from manual viewing of the codebase (#2585)

This commit is contained in:
Mark Baker 2022-02-12 22:04:02 +01:00 committed by GitHub
parent 8f3c52a3cf
commit de2fb1f438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 2609 deletions

View File

@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org).
## Unreleased - TBD
- Fixed `ReferenceHelper@insertNewBefore` behavior when removing column before last column with null value
### Added
- Improved support for passing of array arguments to Excel function implementations to return array results (where appropriate). [Issue #2551](https://github.com/PHPOffice/PhpSpreadsheet/issues/2551)
@ -51,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
### Fixed
- Fixed `ReferenceHelper@insertNewBefore` behavior when removing column before last column with null value
- Fix bug with `DOLLARDE()` and `DOLLARFR()` functions when the dollar value is negative [Issue #2578](https://github.com/PHPOffice/PhpSpreadsheet/issues/2578) [PR #2579](https://github.com/PHPOffice/PhpSpreadsheet/pull/2579)
- Fix partial function name matching when translating formulae from Russian to English [Issue #2533](https://github.com/PHPOffice/PhpSpreadsheet/issues/2533) [PR #2534](https://github.com/PHPOffice/PhpSpreadsheet/pull/2534)
- Various bugs related to Conditional Formatting Rules, and errors in the Xlsx Writer for Conditional Formatting [PR #2491](https://github.com/PHPOffice/PhpSpreadsheet/pull/2491)

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ includes:
- vendor/phpstan/phpstan-phpunit/rules.neon
parameters:
level: max
level: 8
paths:
- src/
- tests/

View File

@ -88,6 +88,14 @@ class Replace
return $e->getMessage();
}
return self::executeSubstitution($text, $fromText, $toText, $instance);
}
/**
* @return string
*/
private static function executeSubstitution(string $text, string $fromText, string $toText, int $instance)
{
$pos = -1;
while ($instance > 0) {
$pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8');

View File

@ -394,7 +394,6 @@ class Column
foreach ($value as $k => $v) {
$cloned = clone $v;
$cloned->setParent($this); // attach the new cloned Rule to this new cloned Autofilter Cloned object
// @phpstan-ignore-next-line
$this->ruleset[$k] = $cloned;
}
} else {