mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
More provider typing
This commit is contained in:
parent
3a2c457d87
commit
9bdc9f774f
@ -243,7 +243,7 @@ class AnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -938,7 +938,7 @@ class AnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ArgTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -71,7 +71,7 @@ class ArgTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ArrayAccessTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -357,7 +357,7 @@ class ArrayAccessTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ class ArrayAssignmentTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -1078,7 +1078,7 @@ class ArrayAssignmentTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class AssertTest extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -577,7 +577,7 @@ class AssertTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class AssignmentTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -49,7 +49,7 @@ class AssignmentTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ class BinaryOperationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -201,7 +201,7 @@ class BinaryOperationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class CallableTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -761,7 +761,7 @@ class CallableTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ClassLoadOrderTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -119,7 +119,7 @@ class ClassLoadOrderTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ClassScopeTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -136,7 +136,7 @@ class ClassScopeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ class ClassStringTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -531,7 +531,7 @@ class ClassStringTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ class ClassTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -375,7 +375,7 @@ class ClassTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ConstantTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -378,7 +378,7 @@ class ConstantTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
@ -478,7 +478,7 @@ class ConstantTest extends TestCase
|
||||
namespace C {
|
||||
echo A\B;
|
||||
}',
|
||||
'UndefinedConstant',
|
||||
'error_message' => 'UndefinedConstant',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ class DeprecatedAnnotationTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -26,7 +26,7 @@ class DeprecatedAnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class EmptyTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -339,7 +339,7 @@ class EmptyTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class EnumTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -105,7 +105,7 @@ class EnumTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ForbiddenCodeTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
@ -31,7 +31,7 @@ class ForbiddenCodeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class FunctionCallTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -1480,7 +1480,7 @@ class FunctionCallTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class InterfaceTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -529,7 +529,7 @@ class InterfaceTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class InternalAnnotationTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -177,7 +177,7 @@ class InternalAnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class IssetTest extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -519,7 +519,7 @@ class IssetTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class IssueSuppressionTest extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -83,7 +83,7 @@ class IssueSuppressionTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ListTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -71,7 +71,7 @@ class ListTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ class DoTest extends \Psalm\Tests\TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -296,7 +296,7 @@ class DoTest extends \Psalm\Tests\TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ class ForTest extends \Psalm\Tests\TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -112,7 +112,7 @@ class ForTest extends \Psalm\Tests\TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ class ForeachTest extends \Psalm\Tests\TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -850,7 +850,7 @@ class ForeachTest extends \Psalm\Tests\TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ class WhileTest extends \Psalm\Tests\TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -332,7 +332,7 @@ class WhileTest extends \Psalm\Tests\TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ class MagicMethodAnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -432,7 +432,7 @@ class MagicMethodAnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class MagicPropertyTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -503,7 +503,7 @@ class MagicPropertyTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class MethodCallTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -295,7 +295,7 @@ class MethodCallTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ class MethodSignatureTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -400,7 +400,7 @@ class MethodSignatureTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class NamespaceTest extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -71,7 +71,7 @@ class NamespaceTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ class Php40Test extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ class Php55Test extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class Php56Test extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -265,7 +265,7 @@ class Php56Test extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class Php70Test extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -353,7 +353,7 @@ class Php70Test extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class Php71Test extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -248,7 +248,7 @@ class Php71Test extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -4,6 +4,7 @@ namespace Psalm\Test\Plugin;
|
||||
use Psalm\Plugin;
|
||||
use SimpleXMLElement;
|
||||
|
||||
/** @psalm-suppress UnusedClass */
|
||||
class FunctionPlugin implements \Psalm\Plugin\PluginEntryPointInterface
|
||||
{
|
||||
/** @return void */
|
||||
|
@ -4,6 +4,7 @@ namespace Psalm\Test\Plugin;
|
||||
use Psalm\Plugin;
|
||||
use SimpleXMLElement;
|
||||
|
||||
/** @psalm-suppress UnusedClass */
|
||||
class MethodPlugin implements \Psalm\Plugin\PluginEntryPointInterface
|
||||
{
|
||||
/** @return void */
|
||||
|
@ -4,6 +4,7 @@ namespace Psalm\Test\Plugin;
|
||||
use Psalm\Plugin;
|
||||
use SimpleXMLElement;
|
||||
|
||||
/** @psalm-suppress UnusedClass */
|
||||
class PropertyPlugin implements \Psalm\Plugin\PluginEntryPointInterface
|
||||
{
|
||||
/** @return void */
|
||||
|
@ -40,39 +40,6 @@ class ProjectAnalyzerTest extends TestCase
|
||||
$this->file_provider = new Provider\FakeFileProvider();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
* @psalm-return array<mixed, string>
|
||||
*/
|
||||
public static function getAllIssues()
|
||||
{
|
||||
return array_filter(
|
||||
array_map(
|
||||
/**
|
||||
* @param string $file_name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function ($file_name) {
|
||||
return substr($file_name, 0, -4);
|
||||
},
|
||||
scandir(dirname(__DIR__) . '/src/Psalm/Issue')
|
||||
),
|
||||
/**
|
||||
* @param string $issue_name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function ($issue_name) {
|
||||
return !empty($issue_name)
|
||||
&& $issue_name !== 'MethodIssue'
|
||||
&& $issue_name !== 'PropertyIssue'
|
||||
&& $issue_name !== 'ClassIssue'
|
||||
&& $issue_name !== 'CodeIssue';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Config $config
|
||||
*
|
||||
|
@ -147,7 +147,7 @@ class PropertyTypeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -1472,7 +1472,7 @@ class PropertyTypeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class RedundantConditionTest extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -553,7 +553,7 @@ class RedundantConditionTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ReferenceConstraintTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -86,7 +86,7 @@ class ReferenceConstraintTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ReturnTypeTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -591,7 +591,7 @@ class ReturnTypeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ScopeTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -239,7 +239,7 @@ class ScopeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class SwitchTypeTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -513,7 +513,7 @@ class SwitchTypeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ class TemplateExtendsTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -1367,7 +1367,7 @@ class TemplateExtendsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ class TemplateTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -1715,7 +1715,7 @@ class TemplateTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class ToStringTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -94,7 +94,7 @@ class ToStringTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class TraitTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -829,7 +829,7 @@ class TraitTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ use Psalm\Context;
|
||||
trait InvalidCodeAnalysisTestTrait
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
abstract public function providerInvalidCodeParse();
|
||||
|
||||
|
@ -7,7 +7,7 @@ use Psalm\Context;
|
||||
trait ValidCodeAnalysisTestTrait
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
abstract public function providerValidCodeParse();
|
||||
|
||||
|
@ -7,7 +7,7 @@ class TryCatchTest extends TestCase
|
||||
use Traits\InvalidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -206,7 +206,7 @@ class TryCatchTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class TypeAlgebraTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -906,7 +906,7 @@ class TypeAlgebraTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class TypeAnnotationTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -159,7 +159,7 @@ class TypeAnnotationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ class TypeCombinationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ class TypeReconciliationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -1287,7 +1287,7 @@ class TypeReconciliationTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ class TypeTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -994,7 +994,7 @@ class TypeTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
@ -1132,7 +1132,7 @@ class TypeTest extends TestCase
|
||||
$one->fooFoo();
|
||||
}
|
||||
}',
|
||||
'error_mesage' => 'PossiblyNullReference',
|
||||
'error_message' => 'PossiblyNullReference',
|
||||
],
|
||||
'nullableMethodWithGuardedNestedIncompleteRedefinition' => [
|
||||
'<?php
|
||||
|
@ -7,7 +7,7 @@ class ValueTest extends TestCase
|
||||
use Traits\ValidCodeAnalysisTestTrait;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
@ -465,14 +465,14 @@ class ValueTest extends TestCase
|
||||
if ($a == "b" && rand(0, 1)) {}
|
||||
}
|
||||
}',
|
||||
[],
|
||||
'assertions' => [],
|
||||
'error_levels' => ['MissingParamType', 'MixedAssignment'],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,error_message:string,2?:string[],3?:bool,4?:string}>
|
||||
*/
|
||||
public function providerInvalidCodeParse()
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ class VariadicTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return iterable<string,array{string,1?:array<string,string>,2?:string[]}>
|
||||
*/
|
||||
public function providerValidCodeParse()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user