diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist new file mode 100644 index 00000000..3eafb6ca --- /dev/null +++ b/.phpcs.xml.dist @@ -0,0 +1,22 @@ + + + + samples + src + tests + + samples/Header.php + */tests/Core/*/*Test\.(inc|css|js)$ + + + + + + + + + + + + diff --git a/composer.json b/composer.json index 32df7bac..00b6fe9e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "scripts": { "check": [ "php-cs-fixer fix --ansi --dry-run --diff", - "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR12 -n", + "phpcs", "phpunit --color=always" ], "fix": [ diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 19e2fc89..10ba064a 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -3277,7 +3277,7 @@ class Calculation } // Parse the formula and return the token stack - return $this->_parseFormula($formula); + return $this->internalParseFormula($formula); } /** @@ -3418,7 +3418,7 @@ class Calculation // Parse the formula onto the token stack and calculate the value $this->cyclicReferenceStack->push($wsCellReference); - $cellValue = $this->processTokenStack($this->_parseFormula($formula, $pCell), $cellID, $pCell); + $cellValue = $this->processTokenStack($this->internalParseFormula($formula, $pCell), $cellID, $pCell); $this->cyclicReferenceStack->pop(); // Save to calculation cache @@ -3765,7 +3765,7 @@ class Calculation * * @return bool */ - private function _parseFormula($formula, ?Cell $pCell = null) + private function internalParseFormula($formula, ?Cell $pCell = null) { if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { return false;