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
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
+5-10Lines changed: 5 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -722,12 +722,7 @@ parameters:
722
722
723
723
-
724
724
message:"#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:\\$options \\(array\\<int, mixed\\>\\) does not accept array\\.$#"
725
-
count:2
726
-
path:src/Components/OptionsArray.php
727
-
728
-
-
729
-
message:"#^Property PhpMyAdmin\\\\SqlParser\\\\Components\\\\OptionsArray\\:\\:\\$options \\(array\\<int, mixed\\>\\) does not accept array\\<int\\|string, mixed\\>\\.$#"
730
-
count:8
725
+
count:10
731
726
path:src/Components/OptionsArray.php
732
727
733
728
-
@@ -2117,7 +2112,7 @@ parameters:
2117
2112
2118
2113
-
2119
2114
message:"#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#"
2120
-
count:33
2115
+
count:34
2121
2116
path:tests/Builder/CreateStatementTest.php
2122
2117
2123
2118
-
@@ -2407,7 +2402,7 @@ parameters:
2407
2402
2408
2403
-
2409
2404
message:"#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#"
2410
-
count:8
2405
+
count:9
2411
2406
path:tests/Components/OptionsArrayTest.php
2412
2407
2413
2408
-
@@ -2642,12 +2637,12 @@ parameters:
2642
2637
2643
2638
-
2644
2639
message:"#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertCount\\(\\)\\.$#"
2645
-
count:8
2640
+
count:14
2646
2641
path:tests/Parser/WithStatementTest.php
2647
2642
2648
2643
-
2649
2644
message:"#^Dynamic call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertEquals\\(\\)\\.$#"
WITH RECURSIVE number_sequence AS (SELECT 1 AS `number` UNION ALL SELECT `number`+ 1 FROM number_sequence WHERE `number` < 5) SELECT * FROM number_sequence
SELECT n + 1, CONCAT(str, str) FROM cte WHERE n < 3
115
+
), cte2 AS
116
+
(
117
+
SELECT 1 AS n, CAST('def' AS CHAR(20)) AS str
118
+
UNION ALL
119
+
SELECT n + 1, CONCAT(str, str) FROM cte WHERE n < 3
120
+
)
121
+
SELECT * FROM cte UNION SELECT * FROM cte2;
122
+
SQL;
123
+
124
+
$lexer = newLexer($sql);
125
+
126
+
$lexerErrors = $this->getErrorsAsArray($lexer);
127
+
$this->assertCount(0, $lexerErrors);
128
+
$parser = newParser($lexer->list);
129
+
$parserErrors = $this->getErrorsAsArray($parser);
130
+
$this->assertCount(0, $parserErrors);
131
+
$this->assertCount(1, $parser->statements);
132
+
133
+
// phpcs:disable Generic.Files.LineLength.TooLong
134
+
$expected = <<<SQL
135
+
WITH RECURSIVE cte AS (SELECT 1 AS `n`, CAST('abc' AS CHAR(20)) AS `str` UNION ALL SELECT n+ 1, CONCAT(str, str) FROM cte WHERE n < 3), cte2 AS (SELECT 1 AS `n`, CAST('def' AS CHAR(20)) AS `str` UNION ALL SELECT n+ 1, CONCAT(str, str) FROM cte WHERE n < 3) SELECT * FROM cte UNION SELECT * FROM cte2
0 commit comments