Skip to content

Commit b338c18

Browse files
committed
Remove SqlParser\Utils\Query::getAll() stub
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent ed3c95b commit b338c18

5 files changed

Lines changed: 80 additions & 75 deletions

File tree

‎phpstan-baseline.neon‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13120,11 +13120,41 @@ parameters:
1312013120
count: 2
1312113121
path: src/Operations.php
1312213122

13123+
-
13124+
message: "#^Cannot access offset 0 on mixed\\.$#"
13125+
count: 4
13126+
path: src/ParseAnalyze.php
13127+
13128+
-
13129+
message: "#^Cannot access offset 1 on mixed\\.$#"
13130+
count: 2
13131+
path: src/ParseAnalyze.php
13132+
1312313133
-
1312413134
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
1312513135
count: 2
1312613136
path: src/ParseAnalyze.php
1312713137

13138+
-
13139+
message: "#^Offset 'select_tables' on array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\<string\\|null\\>, select_tables\\?\\: array\\<array\\{string, string\\|null\\}\\>, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} in empty\\(\\) does not exist\\.$#"
13140+
count: 1
13141+
path: src/ParseAnalyze.php
13142+
13143+
-
13144+
message: "#^Parameter \\#1 \\$info of static method PhpMyAdmin\\\\StatementInfo\\:\\:fromArray\\(\\) expects array\\{distinct\\: bool, drop_database\\: bool, group\\: bool, having\\: bool, is_affected\\: bool, is_analyse\\: bool, is_count\\: bool, is_delete\\: bool, \\.\\.\\.\\}, array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\<string\\|null\\>, select_tables\\?\\: array\\<array\\{string, string\\|null\\}\\>, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} given\\.$#"
13145+
count: 1
13146+
path: src/ParseAnalyze.php
13147+
13148+
-
13149+
message: "#^Parameter \\#1 \\$string1 of function strcasecmp expects string, mixed given\\.$#"
13150+
count: 1
13151+
path: src/ParseAnalyze.php
13152+
13153+
-
13154+
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
13155+
count: 1
13156+
path: src/ParseAnalyze.php
13157+
1312813158
-
1312913159
message: "#^Cannot access offset 'Table' on mixed\\.$#"
1313013160
count: 4
@@ -17955,6 +17985,11 @@ parameters:
1795517985
count: 1
1795617986
path: src/Sql.php
1795717987

17988+
-
17989+
message: "#^Parameter \\#1 \\$info of static method PhpMyAdmin\\\\StatementInfo\\:\\:fromArray\\(\\) expects array\\{distinct\\: bool, drop_database\\: bool, group\\: bool, having\\: bool, is_affected\\: bool, is_analyse\\: bool, is_count\\: bool, is_delete\\: bool, \\.\\.\\.\\}, array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\<string\\|null\\>, select_tables\\?\\: array\\<array\\{string, string\\|null\\}\\>, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} given\\.$#"
17990+
count: 1
17991+
path: src/Sql.php
17992+
1795817993
-
1795917994
message: "#^Parameter \\#1 \\$rows of static method PhpMyAdmin\\\\Message\\:\\:getMessageForAffectedRows\\(\\) expects int, int\\|string given\\.$#"
1796017995
count: 2
@@ -20525,6 +20560,11 @@ parameters:
2052520560
count: 2
2052620561
path: test/classes/Display/ResultsTest.php
2052720562

20563+
-
20564+
message: "#^Parameter \\#1 \\$info of static method PhpMyAdmin\\\\StatementInfo\\:\\:fromArray\\(\\) expects array\\{distinct\\: bool, drop_database\\: bool, group\\: bool, having\\: bool, is_affected\\: bool, is_analyse\\: bool, is_count\\: bool, is_delete\\: bool, \\.\\.\\.\\}, array\\{distinct\\?\\: bool, drop_database\\?\\: bool, group\\?\\: bool, having\\?\\: bool, is_affected\\?\\: bool, is_analyse\\?\\: bool, is_count\\?\\: bool, is_delete\\?\\: bool, \\.\\.\\.\\}&array\\{select_expr\\?\\: array\\<string\\|null\\>, select_tables\\?\\: array\\<array\\{string, string\\|null\\}\\>, statement\\?\\: PhpMyAdmin\\\\SqlParser\\\\Statement\\|null, parser\\?\\: PhpMyAdmin\\\\SqlParser\\\\Parser\\} given\\.$#"
20565+
count: 3
20566+
path: test/classes/Display/ResultsTest.php
20567+
2052820568
-
2052920569
message: "#^Parameter \\#1 \\$string of function htmlspecialchars_decode expects string, mixed given\\.$#"
2053020570
count: 1

‎phpstan.neon.dist‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ parameters:
1313
bootstrapFiles:
1414
- test/phpstan-constants.php
1515
stubFiles:
16-
- test/stubs/Query.stub
1716
- test/stubs/uploadprogress.stub
1817
excludePaths:
1918
- libraries/cache/*

‎psalm-baseline.xml‎

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7959,6 +7959,11 @@
79597959
<code><![CDATA['data']]></code>
79607960
</TypeDoesNotContainNull>
79617961
</file>
7962+
<file src="src/ParseAnalyze.php">
7963+
<ArgumentTypeCoercion>
7964+
<code>$info</code>
7965+
</ArgumentTypeCoercion>
7966+
</file>
79627967
<file src="src/Partitioning/Maintenance.php">
79637968
<MixedArrayAccess>
79647969
<code><![CDATA[$row['Table']]]></code>
@@ -9628,13 +9633,6 @@
96289633
</PossiblyUnusedReturnValue>
96299634
</file>
96309635
<file src="src/Plugins/Import/ImportShp.php">
9631-
<DeprecatedMethod>
9632-
<code>Config::getInstance()</code>
9633-
<code>DatabaseInterface::getInstance()</code>
9634-
</DeprecatedMethod>
9635-
<InvalidArgument>
9636-
<code>$sqlStatements</code>
9637-
</InvalidArgument>
96389636
<InvalidArrayOffset>
96399637
<code><![CDATA[$GLOBALS['buffer']]]></code>
96409638
<code><![CDATA[$GLOBALS['eof']]]></code>
@@ -9645,16 +9643,22 @@
96459643
<code><![CDATA[$GLOBALS['buffer']]]></code>
96469644
<code><![CDATA[$GLOBALS['buffer']]]></code>
96479645
<code><![CDATA[$GLOBALS['importHandle']]]></code>
9646+
<code>$dbfFileName</code>
96489647
<code>$dbfFilePath</code>
96499648
<code>$dbfFilePath</code>
9650-
<code>$gisType</code>
9649+
<code>$extracted</code>
9650+
<code>$result</code>
9651+
<code><![CDATA[$shp->getDBFHeader()]]></code>
96519652
</MixedArgument>
96529653
<MixedArrayAccess>
96539654
<code>$c[0]</code>
9655+
<code>$dbfHeader[$n]</code>
96549656
<code>$dbfHeader[$n][0]</code>
96559657
</MixedArrayAccess>
96569658
<MixedArrayAssignment>
9659+
<code>$analyses[$tableNo][Import::FORMATTEDSQL]</code>
96579660
<code>$analyses[$tableNo][Import::FORMATTEDSQL][$spatialCol]</code>
9661+
<code>$analyses[$tableNo][Import::TYPES]</code>
96589662
<code>$analyses[$tableNo][Import::TYPES][$spatialCol]</code>
96599663
</MixedArrayAssignment>
96609664
<MixedArrayOffset>
@@ -9665,29 +9669,38 @@
96659669
<code><![CDATA[$GLOBALS['eof']]]></code>
96669670
<code><![CDATA[$GLOBALS['importHandle']]]></code>
96679671
<code><![CDATA[$GLOBALS['local_import_file']]]></code>
9672+
<code><![CDATA[$GLOBALS['message']]]></code>
9673+
<code><![CDATA[$GLOBALS['message']]]></code>
9674+
<code><![CDATA[$GLOBALS['message']]]></code>
9675+
<code>$analyses[]</code>
96689676
<code>$c</code>
96699677
<code>$colNames[]</code>
9678+
<code>$config</code>
9679+
<code>$dbfFileName</code>
9680+
<code>$dbfFileName</code>
9681+
<code>$dbfHeader</code>
9682+
<code>$extracted</code>
9683+
<code>$result</code>
9684+
<code>$temp</code>
96709685
</MixedAssignment>
96719686
<MixedOperand>
96729687
<code><![CDATA[$GLOBALS['buffer']]]></code>
9673-
<code><![CDATA[$gisObj->getShape($record->shpData)]]></code>
9688+
<code>$dbfFileName</code>
9689+
<code>$temp</code>
96749690
</MixedOperand>
9675-
<PossiblyInvalidArrayAssignment>
9676-
<code>$analyses[$tableNo][Import::FORMATTEDSQL]</code>
9677-
<code>$analyses[$tableNo][Import::TYPES]</code>
9678-
</PossiblyInvalidArrayAssignment>
9691+
<MixedPropertyFetch>
9692+
<code><![CDATA[$config->settings]]></code>
9693+
</MixedPropertyFetch>
9694+
<MixedReturnTypeCoercion>
9695+
<code>$sqlStatements</code>
9696+
<code>string[]</code>
9697+
</MixedReturnTypeCoercion>
96799698
<PossiblyNullArgument>
96809699
<code><![CDATA[$GLOBALS['buffer']]]></code>
96819700
<code><![CDATA[$GLOBALS['buffer']]]></code>
96829701
<code><![CDATA[$GLOBALS['import_file']]]></code>
96839702
<code><![CDATA[$GLOBALS['import_file']]]></code>
9684-
<code><![CDATA[$GLOBALS['import_file']]]></code>
9685-
<code><![CDATA[$GLOBALS['import_file']]]></code>
9686-
<code><![CDATA[$shp->getDBFHeader()]]></code>
96879703
</PossiblyNullArgument>
9688-
<PossiblyNullIterator>
9689-
<code><![CDATA[$shp->getDBFHeader()]]></code>
9690-
</PossiblyNullIterator>
96919704
<PossiblyUnusedReturnValue>
96929705
<code>string[]</code>
96939706
</PossiblyUnusedReturnValue>
@@ -11749,6 +11762,9 @@
1174911762
</MixedAssignment>
1175011763
</file>
1175111764
<file src="src/Sql.php">
11765+
<ArgumentTypeCoercion>
11766+
<code>Query::getAll($fullSqlQuery)</code>
11767+
</ArgumentTypeCoercion>
1175211768
<DeprecatedMethod>
1175311769
<code>Config::getInstance()</code>
1175411770
<code>Config::getInstance()</code>
@@ -14472,6 +14488,11 @@
1447214488
</PossiblyUnusedMethod>
1447314489
</file>
1447414490
<file src="test/classes/Display/ResultsTest.php">
14491+
<ArgumentTypeCoercion>
14492+
<code>Query::getAll($query)</code>
14493+
<code>Query::getAll($query)</code>
14494+
<code><![CDATA[Query::getAll('SELECT * FROM pma')]]></code>
14495+
</ArgumentTypeCoercion>
1447514496
<DeprecatedMethod>
1447614497
<code>Config::getInstance()</code>
1447714498
<code>Config::getInstance()</code>
@@ -15527,7 +15548,6 @@
1552715548
</InvalidArrayOffset>
1552815549
<MixedArgument>
1552915550
<code><![CDATA[$GLOBALS['import_notice']]]></code>
15530-
<code><![CDATA[$GLOBALS['import_notice']]]></code>
1553115551
</MixedArgument>
1553215552
<RedundantCondition>
1553315553
<code>assertFalse</code>

‎psalm.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
</projectFiles>
3131

3232
<stubs>
33-
<file name="test/stubs/Query.stub"/>
3433
<file name="test/stubs/uploadprogress.stub"/>
3534
</stubs>
3635

‎test/stubs/Query.stub‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)