Skip to content

Commit e227484

Browse files
committed
Update PHPStan baseline
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent efbd8d8 commit e227484

1 file changed

Lines changed: 127 additions & 7 deletions

File tree

phpstan-baseline.neon

Lines changed: 127 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ parameters:
3030
count: 1
3131
path: libraries/classes/Advisory/Advisor.php
3232

33+
-
34+
message: "#^Parameter \\#3 \\$subject of function preg_replace_callback expects array\\|string, array\\<int, string\\>\\|string\\|null given\\.$#"
35+
count: 1
36+
path: libraries/classes/Advisory/Advisor.php
37+
3338
-
3439
message: "#^Property PhpMyAdmin\\\\Advisory\\\\Advisor\\:\\:\\$globals type has no value type specified in iterable type array\\.$#"
3540
count: 1
@@ -837,7 +842,7 @@ parameters:
837842

838843
-
839844
message: "#^Casting to string something that's already string\\.$#"
840-
count: 3
845+
count: 4
841846
path: libraries/classes/ConfigStorage/Relation.php
842847

843848
-
@@ -1025,6 +1030,11 @@ parameters:
10251030
count: 1
10261031
path: libraries/classes/Controllers/Database/CentralColumnsController.php
10271032

1033+
-
1034+
message: "#^Parameter \\#2 \\$field_select of method PhpMyAdmin\\\\Database\\\\CentralColumns\\:\\:deleteColumnsFromList\\(\\) expects array, array\\<int, string\\>\\|string given\\.$#"
1035+
count: 1
1036+
path: libraries/classes/Controllers/Database/CentralColumnsController.php
1037+
10281038
-
10291039
message: "#^Cannot cast mixed to string\\.$#"
10301040
count: 1
@@ -1360,6 +1370,11 @@ parameters:
13601370
count: 1
13611371
path: libraries/classes/Controllers/HomeController.php
13621372

1373+
-
1374+
message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, array\\<int, string\\>\\|string\\|null given\\.$#"
1375+
count: 1
1376+
path: libraries/classes/Controllers/Import/ImportController.php
1377+
13631378
-
13641379
message: "#^Cannot access offset 'eventEditor' on mixed\\.$#"
13651380
count: 1
@@ -1625,6 +1640,11 @@ parameters:
16251640
count: 1
16261641
path: libraries/classes/Controllers/Table/RelationController.php
16271642

1643+
-
1644+
message: "#^Argument of an invalid type array\\<int, string\\>\\|string supplied for foreach, only iterables are supported\\.$#"
1645+
count: 1
1646+
path: libraries/classes/Controllers/Table/ReplaceController.php
1647+
16281648
-
16291649
message: "#^Call to function method_exists\\(\\) with PhpMyAdmin\\\\Plugins\\\\IOTransformationsPlugin and 'isSuccess' will always evaluate to true\\.$#"
16301650
count: 1
@@ -1645,6 +1665,21 @@ parameters:
16451665
count: 1
16461666
path: libraries/classes/Controllers/Table/SearchController.php
16471667

1668+
-
1669+
message: "#^Parameter \\#1 \\$str of function strtoupper expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
1670+
count: 1
1671+
path: libraries/classes/Controllers/Table/SearchController.php
1672+
1673+
-
1674+
message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getIntegerRange\\(\\) expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
1675+
count: 1
1676+
path: libraries/classes/Controllers/Table/SearchController.php
1677+
1678+
-
1679+
message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getTypeOperatorsHtml\\(\\) expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
1680+
count: 1
1681+
path: libraries/classes/Controllers/Table/SearchController.php
1682+
16481683
-
16491684
message: "#^Parameter \\#2 \\$foreign_field of method PhpMyAdmin\\\\ConfigStorage\\\\Relation\\:\\:foreignDropdown\\(\\) expects string, mixed given\\.$#"
16501685
count: 1
@@ -1905,6 +1940,21 @@ parameters:
19051940
count: 1
19061941
path: libraries/classes/Controllers/Table/ZoomSearchController.php
19071942

1943+
-
1944+
message: "#^Parameter \\#1 \\$str of function strtoupper expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
1945+
count: 1
1946+
path: libraries/classes/Controllers/Table/ZoomSearchController.php
1947+
1948+
-
1949+
message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getIntegerRange\\(\\) expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
1950+
count: 1
1951+
path: libraries/classes/Controllers/Table/ZoomSearchController.php
1952+
1953+
-
1954+
message: "#^Parameter \\#1 \\$type of method PhpMyAdmin\\\\Types\\:\\:getTypeOperatorsHtml\\(\\) expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
1955+
count: 1
1956+
path: libraries/classes/Controllers/Table/ZoomSearchController.php
1957+
19081958
-
19091959
message: "#^Parameter \\#2 \\$column_index of method PhpMyAdmin\\\\Controllers\\\\Table\\\\ZoomSearchController\\:\\:getColumnProperties\\(\\) expects int, int\\|string\\|false given\\.$#"
19101960
count: 1
@@ -1970,6 +2020,11 @@ parameters:
19702020
count: 1
19712021
path: libraries/classes/Controllers/View/CreateController.php
19722022

2023+
-
2024+
message: "#^Binary operation \"\\*\" between string and 1024\\|1048576\\|1073741824\\|1099511627776 results in an error\\.$#"
2025+
count: 1
2026+
path: libraries/classes/Core.php
2027+
19732028
-
19742029
message: "#^Casting to string something that's already string\\.$#"
19752030
count: 3
@@ -3125,11 +3180,6 @@ parameters:
31253180
count: 1
31263181
path: libraries/classes/Display/Results.php
31273182

3128-
-
3129-
message: "#^Method PhpMyAdmin\\\\Display\\\\Results\\:\\:getOffsets\\(\\) should return array\\<int\\> but returns array\\<int, \\(array\\|float\\|int\\)\\>\\.$#"
3130-
count: 1
3131-
path: libraries/classes/Display/Results.php
3132-
31333183
-
31343184
message: "#^Method PhpMyAdmin\\\\Display\\\\Results\\:\\:getOptionsBlock\\(\\) return type has no value type specified in iterable type array\\.$#"
31353185
count: 1
@@ -4400,6 +4450,11 @@ parameters:
44004450
count: 1
44014451
path: libraries/classes/Header.php
44024452

4453+
-
4454+
message: "#^Cannot cast array\\<int, string\\>\\|string\\|null to string\\.$#"
4455+
count: 1
4456+
path: libraries/classes/Html/Generator.php
4457+
44034458
-
44044459
message: "#^Casting to string something that's already string\\.$#"
44054460
count: 1
@@ -4595,6 +4650,11 @@ parameters:
45954650
count: 2
45964651
path: libraries/classes/Import.php
45974652

4653+
-
4654+
message: "#^Parameter \\#1 \\$sql of method PhpMyAdmin\\\\Import\\:\\:runQuery\\(\\) expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
4655+
count: 1
4656+
path: libraries/classes/Import.php
4657+
45984658
-
45994659
message: "#^Method PhpMyAdmin\\\\Import\\\\Ajax\\:\\:uploadProgressSetup\\(\\) return type has no value type specified in iterable type array\\.$#"
46004660
count: 1
@@ -4905,6 +4965,11 @@ parameters:
49054965
count: 1
49064966
path: libraries/classes/InsertEdit.php
49074967

4968+
-
4969+
message: "#^Method PhpMyAdmin\\\\InsertEdit\\:\\:loadFirstRow\\(\\) should return array\\{PhpMyAdmin\\\\Dbal\\\\ResultInterface, array\\<false\\>\\} but returns array\\{PhpMyAdmin\\\\Dbal\\\\ResultInterface, array\\<int, false\\>\\|false\\}\\.$#"
4970+
count: 1
4971+
path: libraries/classes/InsertEdit.php
4972+
49084973
-
49094974
message: "#^Method PhpMyAdmin\\\\InsertEdit\\:\\:showEmptyResultMessageOrSetUniqueCondition\\(\\) has parameter \\$rows with no value type specified in iterable type array\\.$#"
49104975
count: 1
@@ -5015,6 +5080,11 @@ parameters:
50155080
count: 1
50165081
path: libraries/classes/InternalRelations.php
50175082

5083+
-
5084+
message: "#^Binary operation \"\\-\" between string and 1 results in an error\\.$#"
5085+
count: 1
5086+
path: libraries/classes/IpAllowDeny.php
5087+
50185088
-
50195089
message: "#^Parameter \\#2 \\$ipToTest of method PhpMyAdmin\\\\IpAllowDeny\\:\\:ipMaskTest\\(\\) expects string, string\\|true given\\.$#"
50205090
count: 1
@@ -5670,6 +5740,11 @@ parameters:
56705740
count: 1
56715741
path: libraries/classes/Plugins/Auth/AuthenticationCookie.php
56725742

5743+
-
5744+
message: "#^Binary operation \"\\.\" between 'WWW\\-Authenticate\\:…' and array\\<int, string\\>\\|string\\|null results in an error\\.$#"
5745+
count: 1
5746+
path: libraries/classes/Plugins/Auth/AuthenticationHttp.php
5747+
56735748
-
56745749
message: "#^Property PhpMyAdmin\\\\Plugins\\\\AuthenticationPlugin\\:\\:\\$user \\(string\\) in isset\\(\\) is not nullable\\.$#"
56755750
count: 1
@@ -5820,11 +5895,21 @@ parameters:
58205895
count: 1
58215896
path: libraries/classes/Plugins/Export/ExportPdf.php
58225897

5898+
-
5899+
message: "#^Binary operation \"\\.\" between '_' and array\\<int, string\\>\\|string\\|null results in an error\\.$#"
5900+
count: 1
5901+
path: libraries/classes/Plugins/Export/ExportPhparray.php
5902+
58235903
-
58245904
message: "#^Method PhpMyAdmin\\\\Plugins\\\\Export\\\\ExportPhparray\\:\\:exportData\\(\\) has parameter \\$aliases with no value type specified in iterable type array\\.$#"
58255905
count: 1
58265906
path: libraries/classes/Plugins/Export/ExportPhparray.php
58275907

5908+
-
5909+
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
5910+
count: 1
5911+
path: libraries/classes/Plugins/Export/ExportPhparray.php
5912+
58285913
-
58295914
message: "#^Binary operation \"\\.\" between 'FOREIGN KEY ' and array\\|string results in an error\\.$#"
58305915
count: 1
@@ -5910,6 +5995,11 @@ parameters:
59105995
count: 5
59115996
path: libraries/classes/Plugins/Export/ExportSql.php
59125997

5998+
-
5999+
message: "#^Parameter \\#1 \\$list of class PhpMyAdmin\\\\SqlParser\\\\Parser constructor expects PhpMyAdmin\\\\SqlParser\\\\TokensList\\|PhpMyAdmin\\\\SqlParser\\\\UtfString\\|string\\|null, array\\<int, string\\>\\|string\\|null given\\.$#"
6000+
count: 1
6001+
path: libraries/classes/Plugins/Export/ExportSql.php
6002+
59136003
-
59146004
message: "#^Parameter \\#1 \\$sqlQuery of method PhpMyAdmin\\\\Plugins\\\\Export\\\\ExportSql\\:\\:replaceWithAliases\\(\\) expects string, string\\|null given\\.$#"
59156005
count: 1
@@ -7200,6 +7290,11 @@ parameters:
72007290
count: 1
72017291
path: libraries/classes/Server/Plugins.php
72027292

7293+
-
7294+
message: "#^Binary operation \"\\.\" between 'PASSWORD\\(\\\\'' and array\\<int, string\\>\\|string\\|null results in an error\\.$#"
7295+
count: 2
7296+
path: libraries/classes/Server/Privileges.php
7297+
72037298
-
72047299
message: "#^Casting to string something that's already string\\.$#"
72057300
count: 1
@@ -7855,6 +7950,11 @@ parameters:
78557950
count: 1
78567951
path: libraries/classes/Sql.php
78577952

7953+
-
7954+
message: "#^Method PhpMyAdmin\\\\Sql\\:\\:getDetailedProfilingStats\\(\\) should return array\\<string, array\\|int\\> but returns array\\<string, array\\<int\\|string, mixed\\>\\|float\\|int\\>\\.$#"
7955+
count: 1
7956+
path: libraries/classes/Sql.php
7957+
78587958
-
78597959
message: "#^Method PhpMyAdmin\\\\Sql\\:\\:getHtmlForPreviousUpdateQuery\\(\\) has parameter \\$sqlData with no value type specified in iterable type array\\.$#"
78607960
count: 1
@@ -8270,6 +8370,11 @@ parameters:
82708370
count: 1
82718371
path: libraries/classes/Table/ColumnsDefinition.php
82728372

8373+
-
8374+
message: "#^Parameter \\#1 \\$str of function rtrim expects string, array\\<int, string\\>\\|string\\|null given\\.$#"
8375+
count: 1
8376+
path: libraries/classes/Table/ColumnsDefinition.php
8377+
82738378
-
82748379
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#"
82758380
count: 1
@@ -8360,6 +8465,11 @@ parameters:
83608465
count: 2
83618466
path: libraries/classes/ThemeManager.php
83628467

8468+
-
8469+
message: "#^Binary operation \"\\.\" between non\\-falsy\\-string and array\\<int, string\\>\\|string\\|null results in an error\\.$#"
8470+
count: 1
8471+
path: libraries/classes/Tracker.php
8472+
83638473
-
83648474
message: "#^Cannot access property \\$table on PhpMyAdmin\\\\SqlParser\\\\Components\\\\Expression\\|string\\.$#"
83658475
count: 1
@@ -9151,7 +9261,7 @@ parameters:
91519261
path: test/classes/Command/SetVersionCommandTest.php
91529262

91539263
-
9154-
message: "#^Parameter \\#1 \\$array_arg of function sort expects array, mixed given\\.$#"
9264+
message: "#^Parameter \\#1 \\$array_arg of function sort expects TArray of array\\<T\\>, mixed given\\.$#"
91559265
count: 2
91569266
path: test/classes/Command/TwigLintCommandTest.php
91579267

@@ -9355,6 +9465,11 @@ parameters:
93559465
count: 1
93569466
path: test/classes/ConfigTest.php
93579467

9468+
-
9469+
message: "#^Parameter \\#1 \\$haystack of function mb_strstr expects string, array\\<string\\> given\\.$#"
9470+
count: 1
9471+
path: test/classes/ConfigTest.php
9472+
93589473
-
93599474
message: "#^Cannot access offset 'favoriteTables' on mixed\\.$#"
93609475
count: 1
@@ -9905,6 +10020,11 @@ parameters:
990510020
count: 4
990610021
path: test/classes/Display/ResultsTest.php
990710022

10023+
-
10024+
message: "#^Strict comparison using \\=\\=\\= between 4 and 4 will always evaluate to true\\.$#"
10025+
count: 1
10026+
path: test/classes/EncodingTest.php
10027+
990810028
-
990910029
message: "#^Method PhpMyAdmin\\\\Tests\\\\Engines\\\\PbxtTest\\:\\:providerFortTestResolveTypeSize\\(\\) return type has no value type specified in iterable type array\\.$#"
991010030
count: 1

0 commit comments

Comments
 (0)