PhpSpreadsheet/tests/PhpSpreadsheetTests/Reader
oleibman 766252ccb0
Real Errors Identified in Calculation by Scrutinizer (#2774)
* Real Errors Identified in Calculation by Scrutinizer

Before Scrutinizer broke, I took a look at the remaining 43 errors which it categorized as 'major'. Most of these were false positives, but, in the case of Calculation and Reader/Xlsx/Chart, I was able to determine that its analysis of some of the problems was correct. There is little point addressing the false positives until it starts working again, but we should fix the real errors.

This PR addresses the real errors in Calculation.
- A test for `$pCellParent` should have been a test  for `$pCellWorksheet`.
- A test for `$operand1Data['reference']` should have been a test for `$operand1Data['value']`.
- A test for `$operand2Data['reference']` should have been a test for `$operand2Data['value']`.

* Fix Attempt to Erroneously Call trim on Array

Fix #2780. Warning message is being issued when getting calculated value of cell with value `=INDIRECT(ADDRESS(ROW(),COLUMN()-2))/$C$4`. This appears to be the case for all recent (and probably not so recent) releases; it is not a result of changes to the code base. Fix added to this PR because the erring section of code was proximate to code already changed in the PR. Test added.

* Minor Code Changes

Apply some suggestions from @MarkBaker
2022-04-30 19:13:17 -07:00
..
Csv Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Gnumeric Set Selected Cells for Worksheets in Gnumeric Loader 2022-03-05 19:24:21 +01:00
Html Html import dimension conversions (#2152) 2021-06-11 17:29:49 +02:00
Ods Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Security Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
Slk Process Comments in Sylk File (#2277) 2021-08-26 11:56:13 -07:00
Utility When image source is a URL, store the URL for use during extraction. (#2072) 2021-06-24 10:50:44 +02:00
Xls Replace 'self' with self::class in 2 Modules (#2773) 2022-04-30 18:36:24 -07:00
Xlsx Real Errors Identified in Calculation by Scrutinizer (#2774) 2022-04-30 19:13:17 -07:00
Xml Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00