* Specify data type in html tags using attributes #3444
* Set data types using attributes in flushCell function and add some unit tests
* Check TYPE_INLINE in flushCell and some changes in test cases
* WIP Run phpcs, php-cs-fixer, phpstan, coverage, versions as Php8.1
They all run under Php7.4 in Github. 7.4 is EOL. We still have to run unit tests in 7.4, but I think it's time to move the tools. Note that we cannot currently run Phpstan in 8.2 because of https://github.com/phpstan/phpstan/issues/8629.
* Update main.yml
Try running coverage as 8.0 rather than 8.1.
* Update main.yml
Revert Coverage to Php 7.4.
* Composer Cache Directory
Command set-output is deprecated. Upgrading to using Environment files as suggested by Github messages.
* Coverage and Php8
Try to follow advice in https://github.com/scrutinizer-ci/ocular/issues/54
* Keep Trying
See https://github.com/phpowermove/docblock/pull/12/files
* More Coverage In Unit Tests
Minimal source code changes.
* Scrutinizer
One legitimate complaint and one from out of left field.
* Scrutinizer Lunacy
If this doesn't stop its complaint, I give up.
* Scrutinizer - Whatever
Try again.
* Glutton For Punishment
Try again.
No source changes. Act on some items that have come up in recent discussions.
- Sample 33_Chart_create_line creates a stacked line chart. According to @MarkBaker, the stacking is done on the wrong variable, and, even were that not the case, stacking is unusual for line charts. Since this is our primary sample showing how to create a line chart, remove the stacking. Another sample, with a more appropriate choice of chart (33_Chart_create_bar_stacked), still shows how to create a stacked chart.
- The test for reading a styled cell from Html is flawed. It sets a date format for a string date/time, but the format is applied only to numeric data, so the format, although set correctly, is ineffective. Keep the test, but add some explanation in the assertion, and add some new more effective tests, also with explanations in the assertions.
- Wrong namespace used for Writer/Xlsx/ConditionalFillTest.
Stop a few of scrutinizers complaints about 100% valid use of PHP variadics.
Hopefully, this issue will cease to be an issue when we can specify mixed datatype for variadic arguments in the tests
Also enforce more rigorous Excel Function implementation by testing the underlying implementation, call via the Calc Engine, and execution from in a worksheet.
Separate out unhappy path (exception) checks into a separate test, so that a single test isn't made overcomplex checking for every potentiality.
Scrutinizer may dislike variadics, for variable number of arguments of mixed type; but tough. It's 100% valid PHP, accepted by phpstan, and makes life a lot easier.
Initial work here covers all the database and datetime unit tests for Excel function implementations.
* Allow Color and Effects on Data Points on Chart Axis
Fix#3414. There had been no way to do this. It is now supported via a new AxisText class, which derives from Properties, and has FillColor and effects (glow/shadow/softEdges) properties. The code changes in chart sample 33_Chart_create_scatter2 illustrate usage.
* Minor Performance Improvement
May also get rid of Scrutinizer complaint.
* Eliminate New Spacing Patch
No need for it.
* Add Legend Formatting to Change
Much in common with Data Point formatting.
* Correct Xlsx Parsing of quotePrefix="0"
Fix#3435. Mis-parsed attribute is not normally generated by Excel or PhpSpreadsheet, but some 3rd-party software (correctly) generates it.
* Update Issue3435Test.php
Fix#3405. Autosize is definitely not working well with CJK characters (column is not wide enough). User reports a workaround using `mb_strwidth` to calculate and set the column width. PhpSpreadsheet uses `mb_strlen` for width calculations. Change it to use mb_strwidth instead. For non-CJK strings, the results will be identical (and there are already unit tests on such strings which assert the expected results, and these tests did not need to change). For CJK strings, the results will be wider. The string I'm using to test comes from the issue. It currently results in a column width of 30.564. When I open the resulting sheet in Excel and auto-fit the column width, the width winds up as 43.00. So, as long as the computed width exceeds 43.00, the spreadsheet will show the full cell. With the new calculation, the computed width is 55.2722, satisfying our condition. This is wider than expected, but that is generally true for this type of computation. For example, for 'abcdefghijklmnopqrstuvwxyz', the computed width (before and after this change) is 31.7065, but Excel auto-fit actually uses 24.73.
Disappointingly, "exact width calculation" does not solve this problem. It does seem to do a little better than "approximate" for non-CJK, but its CJK calculation is not wide enough. This might or might not indicate a bug in Php function `imagegetttfbbox`; I do not know enough about it to report a bug. Anyhow, since we're dependent on that result, there is no equivalent in this case for swapping mb_strlen out for mb_strwidth.
* Misplaced Xml Writing Chart Label FillColor
Fix#3397. Move code to correct location.
* Update Issue3397Test.php
No need for spacing patch - just fix it now.
* Minor Fix
See discussion at bottom of PR #2856.
Scrutinizer can only be appeased by adding extra code to pre-define variables that don't need to be pre-defined, and that makes for additional code overhead in a routine that needs to be as performant as possible; so "scrutinizer be damned!"