Skip to content

Commit 4b0902b

Browse files
author
MarkBaker
committed
more
1 parent 6ad3adf commit 4b0902b

File tree

2 files changed

+1
-45
lines changed

2 files changed

+1
-45
lines changed

phpstan-baseline.neon

-35
Original file line numberDiff line numberDiff line change
@@ -235,36 +235,16 @@ parameters:
235235
count: 2
236236
path: src/PhpSpreadsheet/Calculation/Calculation.php
237237

238-
-
239-
message: "#^Parameter \\#1 \\$str1 of method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:strcmpAllowNull\\(\\) expects string\\|null, mixed given\\.$#"
240-
count: 4
241-
path: src/PhpSpreadsheet/Calculation/Calculation.php
242-
243-
-
244-
message: "#^Parameter \\#1 \\$str1 of method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:strcmpLowercaseFirst\\(\\) expects string\\|null, mixed given\\.$#"
245-
count: 2
246-
path: src/PhpSpreadsheet/Calculation/Calculation.php
247-
248238
-
249239
message: "#^Parameter \\#1 \\$string of function strlen expects string, mixed given\\.$#"
250240
count: 1
251241
path: src/PhpSpreadsheet/Calculation/Calculation.php
252242

253-
-
254-
message: "#^Parameter \\#1 \\$textValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:strCaseReverse\\(\\) expects string, string\\|null given\\.$#"
255-
count: 2
256-
path: src/PhpSpreadsheet/Calculation/Calculation.php
257-
258243
-
259244
message: "#^Parameter \\#1 \\$worksheetName of method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\:\\:getSheetByName\\(\\) expects string, mixed given\\.$#"
260245
count: 3
261246
path: src/PhpSpreadsheet/Calculation/Calculation.php
262247

263-
-
264-
message: "#^Parameter \\#2 \\$str2 of method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:strcmpAllowNull\\(\\) expects string\\|null, mixed given\\.$#"
265-
count: 4
266-
path: src/PhpSpreadsheet/Calculation/Calculation.php
267-
268248
-
269249
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, mixed given\\.$#"
270250
count: 4
@@ -285,11 +265,6 @@ parameters:
285265
count: 1
286266
path: src/PhpSpreadsheet/Calculation/Calculation.php
287267

288-
-
289-
message: "#^Parameter \\#4 \\$operation of method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:executeBinaryComparisonOperation\\(\\) expects string, mixed given\\.$#"
290-
count: 1
291-
path: src/PhpSpreadsheet/Calculation/Calculation.php
292-
293268
-
294269
message: "#^Parameter \\#4 \\$storeKey of method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:push\\(\\) expects string\\|null, mixed given\\.$#"
295270
count: 2
@@ -405,16 +380,6 @@ parameters:
405380
count: 2
406381
path: src/PhpSpreadsheet/Calculation/Calculation.php
407382

408-
-
409-
message: "#^Variable \\$inversedStr1 on left side of \\?\\? always exists and is not nullable\\.$#"
410-
count: 1
411-
path: src/PhpSpreadsheet/Calculation/Calculation.php
412-
413-
-
414-
message: "#^Variable \\$inversedStr2 on left side of \\?\\? always exists and is not nullable\\.$#"
415-
count: 1
416-
path: src/PhpSpreadsheet/Calculation/Calculation.php
417-
418383
-
419384
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DMAX\\(\\) should return float but returns float\\|string\\|null\\.$#"
420385
count: 1

src/PhpSpreadsheet/Calculation/Calculation.php

+1-10
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ class Calculation
173173
*/
174174
public $cyclicFormulaCount = 1;
175175

176-
/**
177-
* Epsilon Precision used for comparisons in calculations.
178-
*
179-
* @var float
180-
*/
181-
private $delta = 0.1e-12;
182-
183176
/**
184177
* The current locale setting.
185178
*
@@ -2759,8 +2752,6 @@ class Calculation
27592752

27602753
public function __construct(?Spreadsheet $spreadsheet = null)
27612754
{
2762-
$this->delta = 1 * 10 ** (0 - ini_get('precision'));
2763-
27642755
$this->spreadsheet = $spreadsheet;
27652756
$this->cyclicReferenceStack = new CyclicReferenceStack();
27662757
$this->debugLog = new Logger($this->cyclicReferenceStack);
@@ -4511,7 +4502,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $cell = null)
45114502
case '<=': // Less than or Equal to
45124503
case '=': // Equality
45134504
case '<>': // Inequality
4514-
$result = $this->executeBinaryComparisonOperation($operand1, $operand2, $token, $stack);
4505+
$result = $this->executeBinaryComparisonOperation($operand1, $operand2, (string) $token, $stack);
45154506
if (isset($storeKey)) {
45164507
$branchStore[$storeKey] = $result;
45174508
}

0 commit comments

Comments
 (0)