From 3f11335f7b8cd6f84e3b708417c84266a38b1154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Mon, 3 Apr 2023 23:05:02 +0200 Subject: [PATCH] qa: allow `error_levels` notation which is compatible with named arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- tests/Traits/InvalidCodeAnalysisTestTrait.php | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/Traits/InvalidCodeAnalysisTestTrait.php b/tests/Traits/InvalidCodeAnalysisTestTrait.php index b7276960084..84dfc27cf35 100644 --- a/tests/Traits/InvalidCodeAnalysisTestTrait.php +++ b/tests/Traits/InvalidCodeAnalysisTestTrait.php @@ -16,17 +16,26 @@ use const PHP_OS; use const PHP_VERSION; +/** + * @psalm-type DeprecatedDataProviderArrayNotation = array{ + * code: string, + * error_message: string, + * ignored_issues?: list, + * php_version?: string + * } + * @psalm-type NamedArgumentsDataProviderArrayNotation = array{ + * code: string, + * error_message: string, + * error_levels?: list, + * php_version?: string + * } + */ trait InvalidCodeAnalysisTestTrait { /** * @return iterable< * string, - * array{ - * code: string, - * error_message: string, - * ignored_issues?: list, - * php_version?: string, - * } + * DeprecatedDataProviderArrayNotation|NamedArgumentsDataProviderArrayNotation * > */ abstract public function providerInvalidCodeParse(): iterable;