Skip to content

Commit 177a362

Browse files
authored
Have Phpstan Ignore Chart/Renderer/JpGraph (#2901)
This one class consumes a lot of space in Phpstan baseline. The problem is that it is an interface to Jpgraph, which is not maintained in Composer. This means that we have to disable tests involving this module, since we are dealing with very old code in our test suite. This means that we are very unlikely to do any work on this member, so the code error reports are more of a distraction than anything else. Remove them for now, restoring them if we ever solve this problem.
1 parent 6fae406 commit 177a362

File tree

2 files changed

+2
-286
lines changed

2 files changed

+2
-286
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 280 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,286 +1225,6 @@ parameters:
12251225
count: 1
12261226
path: src/PhpSpreadsheet/Chart/Properties.php
12271227

1228-
-
1229-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has no return type specified\\.$#"
1230-
count: 1
1231-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1232-
1233-
-
1234-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$datasetLabels with no type specified\\.$#"
1235-
count: 1
1236-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1237-
1238-
-
1239-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$groupID with no type specified\\.$#"
1240-
count: 1
1241-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1242-
1243-
-
1244-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$labelCount with no type specified\\.$#"
1245-
count: 1
1246-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1247-
1248-
-
1249-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$rotation with no type specified\\.$#"
1250-
count: 1
1251-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1252-
1253-
-
1254-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatPointMarker\\(\\) has no return type specified\\.$#"
1255-
count: 1
1256-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1257-
1258-
-
1259-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatPointMarker\\(\\) has parameter \\$markerID with no type specified\\.$#"
1260-
count: 1
1261-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1262-
1263-
-
1264-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatPointMarker\\(\\) has parameter \\$seriesPlot with no type specified\\.$#"
1265-
count: 1
1266-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1267-
1268-
-
1269-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:getCaption\\(\\) has no return type specified\\.$#"
1270-
count: 1
1271-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1272-
1273-
-
1274-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:getCaption\\(\\) has parameter \\$captionElement with no type specified\\.$#"
1275-
count: 1
1276-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1277-
1278-
-
1279-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageAdjustValues\\(\\) has no return type specified\\.$#"
1280-
count: 1
1281-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1282-
1283-
-
1284-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageAdjustValues\\(\\) has parameter \\$dataValues with no type specified\\.$#"
1285-
count: 1
1286-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1287-
1288-
-
1289-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageAdjustValues\\(\\) has parameter \\$sumValues with no type specified\\.$#"
1290-
count: 1
1291-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1292-
1293-
-
1294-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageSumCalculation\\(\\) has no return type specified\\.$#"
1295-
count: 1
1296-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1297-
1298-
-
1299-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageSumCalculation\\(\\) has parameter \\$groupID with no type specified\\.$#"
1300-
count: 1
1301-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1302-
1303-
-
1304-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageSumCalculation\\(\\) has parameter \\$seriesCount with no type specified\\.$#"
1305-
count: 1
1306-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1307-
1308-
-
1309-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderAreaChart\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1310-
count: 1
1311-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1312-
1313-
-
1314-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderAreaChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1315-
count: 1
1316-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1317-
1318-
-
1319-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderBarChart\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1320-
count: 1
1321-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1322-
1323-
-
1324-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderBarChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1325-
count: 1
1326-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1327-
1328-
-
1329-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderBubbleChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1330-
count: 1
1331-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1332-
1333-
-
1334-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCartesianPlotArea\\(\\) has parameter \\$type with no type specified\\.$#"
1335-
count: 1
1336-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1337-
1338-
-
1339-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has no return type specified\\.$#"
1340-
count: 1
1341-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1342-
1343-
-
1344-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1345-
count: 1
1346-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1347-
1348-
-
1349-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1350-
count: 1
1351-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1352-
1353-
-
1354-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has parameter \\$outputDestination with no type specified\\.$#"
1355-
count: 1
1356-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1357-
1358-
-
1359-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderContourChart\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1360-
count: 1
1361-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1362-
1363-
-
1364-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderContourChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1365-
count: 1
1366-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1367-
1368-
-
1369-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderLineChart\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1370-
count: 1
1371-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1372-
1373-
-
1374-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderLineChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1375-
count: 1
1376-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1377-
1378-
-
1379-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1380-
count: 1
1381-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1382-
1383-
-
1384-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$doughnut with no type specified\\.$#"
1385-
count: 1
1386-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1387-
1388-
-
1389-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1390-
count: 1
1391-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1392-
1393-
-
1394-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$multiplePlots with no type specified\\.$#"
1395-
count: 1
1396-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1397-
1398-
-
1399-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotBar\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1400-
count: 1
1401-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1402-
1403-
-
1404-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotBar\\(\\) has parameter \\$groupID with no type specified\\.$#"
1405-
count: 1
1406-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1407-
1408-
-
1409-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotContour\\(\\) has parameter \\$groupID with no type specified\\.$#"
1410-
count: 1
1411-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1412-
1413-
-
1414-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$combination with no type specified\\.$#"
1415-
count: 1
1416-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1417-
1418-
-
1419-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$dimensions with no type specified\\.$#"
1420-
count: 1
1421-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1422-
1423-
-
1424-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$filled with no type specified\\.$#"
1425-
count: 1
1426-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1427-
1428-
-
1429-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$groupID with no type specified\\.$#"
1430-
count: 1
1431-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1432-
1433-
-
1434-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotRadar\\(\\) has parameter \\$groupID with no type specified\\.$#"
1435-
count: 1
1436-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1437-
1438-
-
1439-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotScatter\\(\\) has parameter \\$bubble with no type specified\\.$#"
1440-
count: 1
1441-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1442-
1443-
-
1444-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotScatter\\(\\) has parameter \\$groupID with no type specified\\.$#"
1445-
count: 1
1446-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1447-
1448-
-
1449-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotStock\\(\\) has parameter \\$groupID with no type specified\\.$#"
1450-
count: 1
1451-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1452-
1453-
-
1454-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderRadarChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1455-
count: 1
1456-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1457-
1458-
-
1459-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderScatterChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1460-
count: 1
1461-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1462-
1463-
-
1464-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderStockChart\\(\\) has parameter \\$groupCount with no type specified\\.$#"
1465-
count: 1
1466-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1467-
1468-
-
1469-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$chart has no type specified\\.$#"
1470-
count: 1
1471-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1472-
1473-
-
1474-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$colourSet has no type specified\\.$#"
1475-
count: 1
1476-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1477-
1478-
-
1479-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$graph has no type specified\\.$#"
1480-
count: 1
1481-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1482-
1483-
-
1484-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$height has no type specified\\.$#"
1485-
count: 1
1486-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1487-
1488-
-
1489-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$markSet has no type specified\\.$#"
1490-
count: 1
1491-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1492-
1493-
-
1494-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$plotColour has no type specified\\.$#"
1495-
count: 1
1496-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1497-
1498-
-
1499-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$plotMark has no type specified\\.$#"
1500-
count: 1
1501-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1502-
1503-
-
1504-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$width has no type specified\\.$#"
1505-
count: 1
1506-
path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1507-
15081228
-
15091229
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\:\\:\\$layout \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\|null\\.$#"
15101230
count: 1

phpstan.neon.dist

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ parameters:
99
paths:
1010
- src/
1111
- tests/
12+
excludePaths:
13+
- src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
1214
parallel:
1315
processTimeout: 300.0
1416
checkMissingIterableValueType: false
@@ -19,12 +21,6 @@ parameters:
1921
- '~^Parameter \#2 .* of static method PHPUnit\\Framework\\Assert\:\:assert\w+\(\) expects .*, .* given\.$~'
2022
- '~^Method PhpOffice\\PhpSpreadsheetTests\\.*\:\:test.*\(\) has parameter \$args with no type specified\.$~'
2123

22-
# Ignore all JpGraph issues
23-
- '~^Constant (MARK_CIRCLE|MARK_CROSS|MARK_DIAMOND|MARK_DTRIANGLE|MARK_FILLEDCIRCLE|MARK_SQUARE|MARK_STAR|MARK_UTRIANGLE|MARK_X|SIDE_RIGHT) not found\.$~'
24-
- '~^Instantiated class (AccBarPlot|AccLinePlot|BarPlot|ContourPlot|Graph|GroupBarPlot|GroupBarPlot|LinePlot|LinePlot|PieGraph|PiePlot|PiePlot3D|PiePlotC|RadarGraph|RadarPlot|ScatterPlot|Spline|StockPlot) not found\.$~'
25-
- '~^Call to method .*\(\) on an unknown class (AccBarPlot|AccLinePlot|BarPlot|ContourPlot|Graph|GroupBarPlot|GroupBarPlot|LinePlot|LinePlot|PieGraph|PiePlot|PiePlot3D|PiePlotC|RadarGraph|RadarPlot|ScatterPlot|Spline|StockPlot)\.$~'
26-
- '~^Access to property .* on an unknown class (AccBarPlot|AccLinePlot|BarPlot|ContourPlot|Graph|GroupBarPlot|GroupBarPlot|LinePlot|LinePlot|PieGraph|PiePlot|PiePlot3D|PiePlotC|RadarGraph|RadarPlot|ScatterPlot|Spline|StockPlot)\.$~'
27-
2824
# Some issues in Xls/Parser between 1.6.3 and 1.7.7
2925
-
3026
message: "#^Offset '(left|right|value)' does not exist on (non-empty-array\\|string|array\\|null)\\.$#"

0 commit comments

Comments
 (0)