Skip to content

Commit 34675bd

Browse files
committed
Remove dead code
1 parent 9df68f1 commit 34675bd

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/PhpSpreadsheet/Calculation/Calculation.php

-1
Original file line numberDiff line numberDiff line change
@@ -3592,7 +3592,6 @@ private function _parseFormula($formula, Cell $pCell = null)
35923592
$valToUpper = strtoupper($val);
35933593
// here $matches[1] will contain values like "IF"
35943594
// and $val "IF("
3595-
$injectStoreKey = null;
35963595
if ($this->branchPruningEnabled && ($valToUpper == 'IF(')) { // we handle a new if
35973596
$pendingStoreKey = $this->getUnusedBranchStoreKey();
35983597
$pendingStoreKeysStack[] = $pendingStoreKey;

tests/data/Calculation/Calculation.php

+7-9
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ function calculationTestDataGenerator()
1414
$formula1 = '=IF(A1="please +",SUM(A2:C2),7 + IF(B1="please *", 4, 2))';
1515
$set2 = [3, $dataArray1, $formula1, 'E5'];
1616

17-
$originalDataArray = $dataArray1;
18-
1917
$dataArray1[0][0] = 'not please + something else';
2018
$set3 = [11, $dataArray1, $formula1, 'E5'];
2119

@@ -39,11 +37,11 @@ function calculationTestDataGenerator()
3937
$dataArray4 = [
4038
['noflag', 0, 0],
4139
[127000, 0, 0],
42-
[ 10000, 0.03, 0],
43-
[ 20000, 0.06, 0],
44-
[ 40000, 0.09, 0],
45-
[ 70000, 0.12, 0],
46-
[ 90000, 0.03, 0]
40+
[10000, 0.03, 0],
41+
[20000, 0.06, 0],
42+
[40000, 0.09, 0],
43+
[70000, 0.12, 0],
44+
[90000, 0.03, 0],
4745
];
4846
$formula2 = '=IF(A1="flag",IF(A2<10, 0) + IF(A3<10000, 0))';
4947
$set7 = [false, $dataArray4, $formula2, 'E5'];
@@ -52,12 +50,12 @@ function calculationTestDataGenerator()
5250
[1, 2],
5351
[3, 4],
5452
['=A1+A2', '=SUM(B1:B2)'],
55-
[ 'take A', 0]
53+
['take A', 0],
5654
];
5755
$formula3 = '=IF(A4="take A", A3, B3)';
5856
$set8 = [4, $dataArray5, $formula3, 'E5', ['A3'], ['B3']];
5957

6058
return [$set0, $set1, $set2, $set3, $set4, $set5, $set6, $set7, $set8];
61-
};
59+
}
6260

6361
return calculationTestDataGenerator();

0 commit comments

Comments
 (0)