You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Support to Chart/Axis and Gridlines for Shadow (#2872)
* Add Support to Chart/Axis and Gridlines for Shadow
Continuing the work from #2865. Support is added for Shadow properties for Axis and Gridlines, and Glow and SoftEdges are extended to Gridlines. Tests are added. Some chart tests are moved from Reader/Xlsx and Writer/Xlsx so that most chart tests are under a single directory.
This is a minor breaking change. Since the support for these properties was just added, it can't really affect much in userland. Some properties had been stored in the form which the XML requires them rather than as the user would enter them to Excel. So, for example, setting the Glow size to 10 points would have caused it to be stored internally as 127,000. This change will store the size internally as 10, obviously making the appropriate conversion when reading from or writing to XML. This makes unit tests much simpler, and I think this is also what a user would expect, especially considering the difficulties in keeping track of the trailing zeros.
* More Tests
Confirm value change between internal and xml.
* Still More Tests
Add a little more coverage, and use a neat trick suggested by @MarkBaker in the discussion of PR #2724 to greatly simplify MultiplierTest.
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
+2-47
Original file line number
Diff line number
Diff line change
@@ -1170,21 +1170,11 @@ parameters:
1170
1170
count:2
1171
1171
path:src/PhpSpreadsheet/Chart/DataSeries.php
1172
1172
1173
-
-
1174
-
message:"#^Parameter \\#1 \\$angle of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setShadowAngle\\(\\) expects int, int\\|null given\\.$#"
1175
-
count:1
1176
-
path:src/PhpSpreadsheet/Chart/GridLines.php
1177
-
1178
1173
-
1179
1174
message:"#^Parameter \\#1 \\$color of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setGlowColor\\(\\) expects string, string\\|null given\\.$#"
1180
1175
count:1
1181
1176
path:src/PhpSpreadsheet/Chart/GridLines.php
1182
1177
1183
-
-
1184
-
message:"#^Parameter \\#1 \\$distance of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setShadowDistance\\(\\) expects float, float\\|null given\\.$#"
1185
-
count:1
1186
-
path:src/PhpSpreadsheet/Chart/GridLines.php
1187
-
1188
1178
-
1189
1179
message:"#^Parameter \\#2 \\$alpha of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setGlowColor\\(\\) expects int, int\\|null given\\.$#"
1190
1180
count:1
@@ -1275,36 +1265,6 @@ parameters:
1275
1265
count:1
1276
1266
path:src/PhpSpreadsheet/Chart/Properties.php
1277
1267
1278
-
-
1279
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getTrueAlpha\\(\\) has no return type specified\\.$#"
1280
-
count:1
1281
-
path:src/PhpSpreadsheet/Chart/Properties.php
1282
-
1283
-
-
1284
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getTrueAlpha\\(\\) has parameter \\$alpha with no type specified\\.$#"
1285
-
count:1
1286
-
path:src/PhpSpreadsheet/Chart/Properties.php
1287
-
1288
-
-
1289
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has no return type specified\\.$#"
1290
-
count:1
1291
-
path:src/PhpSpreadsheet/Chart/Properties.php
1292
-
1293
-
-
1294
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has parameter \\$alpha with no type specified\\.$#"
1295
-
count:1
1296
-
path:src/PhpSpreadsheet/Chart/Properties.php
1297
-
1298
-
-
1299
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has parameter \\$color with no type specified\\.$#"
1300
-
count:1
1301
-
path:src/PhpSpreadsheet/Chart/Properties.php
1302
-
1303
-
-
1304
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has parameter \\$colorType with no type specified\\.$#"
1305
-
count:1
1306
-
path:src/PhpSpreadsheet/Chart/Properties.php
1307
-
1308
1268
-
1309
1269
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has no return type specified\\.$#"
1310
1270
count:1
@@ -4477,12 +4437,12 @@ parameters:
4477
4437
4478
4438
-
4479
4439
message:"#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, array\\|int\\|string given\\.$#"
4480
-
count:8
4440
+
count:2
4481
4441
path:src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4482
4442
4483
4443
-
4484
4444
message:"#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, array\\|int\\|string\\|null given\\.$#"
4485
-
count:2
4445
+
count:1
4486
4446
path:src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4487
4447
4488
4448
-
@@ -4525,11 +4485,6 @@ parameters:
4525
4485
count:2
4526
4486
path:src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4527
4487
4528
-
-
4529
-
message:"#^Part \\$xAxis\\-\\>getShadowProperty\\('effect'\\) \\(array\\|int\\|string\\|null\\) of encapsed string cannot be cast to string\\.$#"
4530
-
count:1
4531
-
path:src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4532
-
4533
4488
-
4534
4489
message:"#^Part \\$xAxis\\-\\>getShadowProperty\\(\\['color', 'type'\\]\\) \\(array\\|int\\|string\\|null\\) of encapsed string cannot be cast to string\\.$#"
0 commit comments