mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-31 12:40:00 +00:00
Work Around PHPCompatibility Bug
This commit is contained in:
@@ -4,11 +4,17 @@ namespace PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard;
|
||||
|
||||
enum CurrencyNegative
|
||||
{
|
||||
// PHPCompatibility (versions check) has an error which
|
||||
// causes it to flag the use of $this below as erroneous.
|
||||
// They fixed it in their development branch in October 2022.
|
||||
// But they haven't had a release since 2019!
|
||||
// Hence the phpcs disable statment below.
|
||||
case minus;
|
||||
case redMinus;
|
||||
case parentheses;
|
||||
case redParentheses;
|
||||
|
||||
// phpcs:disable PHPCompatibility.Variables.ForbiddenThisUseContexts
|
||||
public function start(): string
|
||||
{
|
||||
return match ($this) {
|
||||
@@ -32,4 +38,5 @@ enum CurrencyNegative
|
||||
self::parentheses, self::minus => '',
|
||||
};
|
||||
}
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user