1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Simplify issue suppression in tests

This commit is contained in:
Matthew Brown 2022-01-13 14:38:17 -05:00
parent f439d6550b
commit b49682a485
90 changed files with 180 additions and 198 deletions

View File

@ -147,7 +147,7 @@ class AnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerValidCodeParse(): iterable
{
@ -193,7 +193,7 @@ class AnnotationTest extends TestCase
}
}',
'assertions' => [],
'error_level' => ['RedundantConditionGivenDocblockType'],
'ignored_issues' => ['RedundantConditionGivenDocblockType'],
],
'checkArrayWithIs' => [
'code' => '<?php
@ -209,7 +209,7 @@ class AnnotationTest extends TestCase
}
}',
'assertions' => [],
'error_level' => ['RedundantConditionGivenDocblockType'],
'ignored_issues' => ['RedundantConditionGivenDocblockType'],
],
'goodDocblock' => [
'code' => '<?php
@ -297,7 +297,7 @@ class AnnotationTest extends TestCase
$a[0]->getMessage();',
'assertions' => [],
'error_level' => ['EmptyArrayAccess', 'MixedMethodCall'],
'ignored_issues' => ['EmptyArrayAccess', 'MixedMethodCall'],
],
'psalmIgnoreVarDocblock' => [
'code' => '<?php
@ -309,7 +309,7 @@ class AnnotationTest extends TestCase
$a[0]->getMessage();',
'assertions' => [],
'error_level' => ['EmptyArrayAccess', 'MixedMethodCall'],
'ignored_issues' => ['EmptyArrayAccess', 'MixedMethodCall'],
],
'mixedDocblockParamTypeDefinedInParent' => [
'code' => '<?php
@ -751,10 +751,7 @@ class AnnotationTest extends TestCase
function fooBar() {
}',
'assertions' => [],
'ignored_issues' => [
'InvalidDocblock' => Config::REPORT_INFO,
'MissingReturnType' => Config::REPORT_INFO,
],
'ignored_issues' => ['InvalidDocblock', 'MissingReturnType'],
],
'objectWithPropertiesAnnotation' => [
'code' => '<?php
@ -1249,7 +1246,7 @@ class AnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>}>
*/
public function providerInvalidCodeParse(): iterable
{
@ -1368,9 +1365,7 @@ class AnnotationTest extends TestCase
function fooBar() {
}',
'error_message' => 'MissingReturnType',
'ignored_issues' => [
'InvalidDocblock' => Config::REPORT_INFO,
],
'ignored_issues' => ['InvalidDocblock'],
],
'invalidDocblockReturn' => [
'code' => '<?php

View File

@ -11,7 +11,7 @@ class ArgTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -313,7 +313,7 @@ class ArgTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -362,7 +362,7 @@ class ArrayAccessTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1042,7 +1042,7 @@ class ArrayAccessTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -32,7 +32,7 @@ class ArrayAssignmentTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1739,7 +1739,7 @@ class ArrayAssignmentTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class ArrayFunctionCallTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -2125,7 +2125,7 @@ class ArrayFunctionCallTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -92,7 +92,7 @@ class AssertAnnotationTest extends TestCase
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1975,7 +1975,7 @@ class AssertAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class AssignmentTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -98,7 +98,7 @@ class AssignmentTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class AttributeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -245,7 +245,7 @@ class AttributeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -260,7 +260,7 @@ class BinaryOperationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -848,7 +848,7 @@ class BinaryOperationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class CallableTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1050,7 +1050,7 @@ class CallableTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -54,7 +54,7 @@ class ClassLikeStringTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -815,7 +815,7 @@ class ClassLikeStringTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ClassLoadOrderTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -123,7 +123,7 @@ class ClassLoadOrderTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ClassScopeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -154,7 +154,7 @@ class ClassScopeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -46,7 +46,7 @@ class ClassTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -652,7 +652,7 @@ class ClassTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class CloneTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -49,7 +49,7 @@ class CloneTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class ClosureTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -739,7 +739,7 @@ class ClosureTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ConstValuesTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -109,7 +109,7 @@ class ConstValuesTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ConstantTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>, php_version?: string}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>, php_version?: string}>
*/
public function providerValidCodeParse(): iterable
{
@ -1234,7 +1234,7 @@ class ConstantTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class CoreStubsTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class DeprecatedAnnotationTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -96,7 +96,7 @@ class DeprecatedAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class DocblockInheritanceTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -154,7 +154,7 @@ class DocblockInheritanceTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class EnumTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -375,7 +375,7 @@ class EnumTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ExtendsFinalClassTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -43,7 +43,7 @@ class ExtendsFinalClassTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -20,7 +20,7 @@ class ForbiddenCodeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{
@ -54,7 +54,7 @@ class ForbiddenCodeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -15,7 +15,7 @@ class FunctionCallTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1789,7 +1789,7 @@ class FunctionCallTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class GeneratorTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -312,7 +312,7 @@ class GeneratorTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class IfThisIsTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ImmutableAnnotationTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -551,7 +551,7 @@ class ImmutableAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class IntRangeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -691,7 +691,7 @@ class IntRangeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class InterfaceTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -725,7 +725,7 @@ class InterfaceTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class InternalAnnotationTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -560,7 +560,7 @@ class InternalAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -251,7 +251,7 @@ class IssueSuppressionTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -410,7 +410,7 @@ class IssueSuppressionTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class ListTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -88,7 +88,7 @@ class ListTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class DoTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -365,7 +365,7 @@ class DoTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class ForTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -183,7 +183,7 @@ class ForTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class ForeachTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1153,7 +1153,7 @@ class ForeachTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class WhileTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -755,7 +755,7 @@ class WhileTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -147,7 +147,7 @@ class MagicMethodAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -754,7 +754,7 @@ class MagicMethodAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -35,7 +35,7 @@ class MagicPropertyTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -734,7 +734,7 @@ class MagicPropertyTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class MatchTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -86,7 +86,7 @@ class MatchTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -200,7 +200,7 @@ class MethodCallTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1008,7 +1008,7 @@ class MethodCallTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -311,7 +311,7 @@ class MethodSignatureTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -941,7 +941,7 @@ class MethodSignatureTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class MixinAnnotationTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -598,7 +598,7 @@ class MixinAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class NamespaceTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -75,7 +75,7 @@ class NamespaceTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class Php40Test extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class Php55Test extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class Php56Test extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class Php70Test extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -217,7 +217,7 @@ class Php70Test extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class Php71Test extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -273,7 +273,7 @@ class Php71Test extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class PropertyTypeInvarianceTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -238,7 +238,7 @@ class PropertyTypeInvarianceTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -346,7 +346,7 @@ class PropertyTypeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -808,6 +808,7 @@ class PropertyTypeTest extends TestCase
public function foo(): void;
}
/** @psalm-suppress PropertyNotSetInConstructor */
abstract class A implements I {
/** @var string */
public $bar;
@ -822,10 +823,6 @@ class PropertyTypeTest extends TestCase
$this->bar = "hello";
}
}',
'assertions' => [],
'ignored_issues' => [
'PropertyNotSetInConstructor' => Config::REPORT_INFO,
],
],
'callsPrivateParentMethodThenUsesParentInitializedProperty' => [
'code' => '<?php
@ -2475,7 +2472,7 @@ class PropertyTypeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class PureAnnotationTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -467,7 +467,7 @@ class PureAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class PureCallableTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -238,7 +238,7 @@ class PureCallableTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class ReadonlyPropertyTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -100,7 +100,7 @@ class ReadonlyPropertyTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ReferenceConstraintTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -187,7 +187,7 @@ class ReferenceConstraintTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class ReturnTypeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1092,7 +1092,7 @@ class ReturnTypeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class SuperGlobalsTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class SwitchTypeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1091,7 +1091,7 @@ class SwitchTypeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class ClassStringMapTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -90,7 +90,7 @@ class ClassStringMapTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class ClassTemplateCovarianceTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -535,7 +535,7 @@ class ClassTemplateCovarianceTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class ClassTemplateExtendsTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -4550,7 +4550,7 @@ class ClassTemplateExtendsTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class ClassTemplateTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -3584,7 +3584,7 @@ class ClassTemplateTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -10,7 +10,7 @@ class ConditionalReturnTypeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class FunctionClassStringTemplateTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -704,7 +704,7 @@ class FunctionClassStringTemplateTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class FunctionTemplateAssertTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -865,7 +865,7 @@ class FunctionTemplateAssertTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class FunctionTemplateTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1607,7 +1607,7 @@ class FunctionTemplateTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class NestedTemplateTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -128,7 +128,7 @@ class NestedTemplateTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class TraitTemplateTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -517,7 +517,7 @@ class TraitTemplateTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class ThisOutTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class ToStringTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -211,7 +211,7 @@ class ToStringTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -9,7 +9,7 @@ class TraceTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -13,7 +13,7 @@ class TraitTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -994,7 +994,7 @@ class TraitTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -6,7 +6,6 @@ use Psalm\Config;
use Psalm\Context;
use Psalm\Exception\CodeException;
use function is_int;
use function method_exists;
use function preg_quote;
use function str_replace;
@ -21,7 +20,7 @@ use const PHP_VERSION;
trait InvalidCodeAnalysisTestTrait
{
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
abstract public function providerInvalidCodeParse(): iterable;
@ -29,7 +28,7 @@ trait InvalidCodeAnalysisTestTrait
* @dataProvider providerInvalidCodeParse
* @small
*
* @param array<int|string, string> $error_levels
* @param list<string> $error_levels
*/
public function testInvalidCode(
string $code,
@ -50,13 +49,9 @@ trait InvalidCodeAnalysisTestTrait
$code = str_replace("\n", "\r\n", $code);
}
foreach ($error_levels as $error_level_key => $error_level) {
if (is_int($error_level_key)) {
$issue_name = $error_level;
$error_level = Config::REPORT_SUPPRESS;
} else {
$issue_name = $error_level_key;
}
foreach ($error_levels as $error_level) {
$issue_name = $error_level;
$error_level = Config::REPORT_SUPPRESS;
Config::getInstance()->setCustomErrorLevel($issue_name, $error_level);
}

View File

@ -5,7 +5,6 @@ namespace Psalm\Tests\Traits;
use Psalm\Config;
use Psalm\Context;
use function is_int;
use function str_replace;
use function strlen;
use function strpos;
@ -19,7 +18,7 @@ use const PHP_VERSION;
trait ValidCodeAnalysisTestTrait
{
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>,php_version?:string}>
*/
abstract public function providerValidCodeParse(): iterable;
@ -28,7 +27,7 @@ trait ValidCodeAnalysisTestTrait
*
* @param string $code
* @param array<string, string> $assertions
* @param array<string|int, string> $error_levels
* @param list<string> $error_levels
*
* @small
*/
@ -47,13 +46,9 @@ trait ValidCodeAnalysisTestTrait
$this->markTestSkipped('Skipped due to a bug.');
}
foreach ($error_levels as $error_level_key => $error_level) {
if (is_int($error_level_key)) {
$issue_name = $error_level;
$error_level = Config::REPORT_SUPPRESS;
} else {
$issue_name = $error_level_key;
}
foreach ($error_levels as $error_level) {
$issue_name = $error_level;
$error_level = Config::REPORT_SUPPRESS;
Config::getInstance()->setCustomErrorLevel($issue_name, $error_level);
}

View File

@ -12,7 +12,7 @@ class TryCatchTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -496,7 +496,7 @@ class TryCatchTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -11,7 +11,7 @@ class TypeAnnotationTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -597,7 +597,7 @@ class TypeAnnotationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -35,7 +35,7 @@ class TypeCombinationTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class ArrayKeyExistsTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -382,7 +382,7 @@ class ArrayKeyExistsTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class AssignmentInConditionalTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -459,7 +459,7 @@ class AssignmentInConditionalTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class ConditionalTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -2843,7 +2843,7 @@ class ConditionalTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class EmptyTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -422,7 +422,7 @@ class EmptyTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class InArrayTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -232,7 +232,7 @@ class InArrayTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class IssetTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1015,7 +1015,7 @@ class IssetTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class RedundantConditionTest extends TestCase
use InvalidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -889,7 +889,7 @@ class RedundantConditionTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class ScopeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -215,7 +215,7 @@ class ScopeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -12,7 +12,7 @@ class TypeAlgebraTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1163,7 +1163,7 @@ class TypeAlgebraTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -14,7 +14,7 @@ class TypeTest extends TestCase
use ValidCodeAnalysisTestTrait;
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{
@ -1135,7 +1135,7 @@ class TypeTest extends TestCase
}
/**
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:array<string>,php_version?:string}>
* @return iterable<string,array{code:string,error_message:string,ignored_issues?:list<string>,php_version?:string}>
*/
public function providerInvalidCodeParse(): iterable
{

View File

@ -35,7 +35,7 @@ class ValueTest extends TestCase
}
/**
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:array<string>}>
* @return iterable<string,array{code:string,assertions?:array<string,string>,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): iterable
{

View File

@ -1211,7 +1211,7 @@ class UnusedCodeTest extends TestCase
}
/**
* @return array<string,array{code:string,error_message:string,ignored_issues?:array<string>}>
* @return array<string,array{code:string,error_message:string,ignored_issues?:list<string>}>
*/
public function providerInvalidCodeParse(): array
{

View File

@ -99,7 +99,7 @@ class UnusedVariableTest extends TestCase
}
/**
* @return array<string, array{code:string,ignored_issues?:array<string>}>
* @return array<string, array{code:string,ignored_issues?:list<string>}>
*/
public function providerValidCodeParse(): array
{