diff --git a/tests/AnnotationTest.php b/tests/AnnotationTest.php index 8ae36cc8a..8d7fa2813 100644 --- a/tests/AnnotationTest.php +++ b/tests/AnnotationTest.php @@ -243,7 +243,7 @@ class AnnotationTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -938,7 +938,7 @@ class AnnotationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ArgTest.php b/tests/ArgTest.php index 10d371658..1f807a3d0 100644 --- a/tests/ArgTest.php +++ b/tests/ArgTest.php @@ -7,7 +7,7 @@ class ArgTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -71,7 +71,7 @@ class ArgTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ArrayAccessTest.php b/tests/ArrayAccessTest.php index 38791a247..da6a1b4ee 100644 --- a/tests/ArrayAccessTest.php +++ b/tests/ArrayAccessTest.php @@ -7,7 +7,7 @@ class ArrayAccessTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -357,7 +357,7 @@ class ArrayAccessTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ArrayAssignmentTest.php b/tests/ArrayAssignmentTest.php index df31f94b4..4f29bcbbe 100644 --- a/tests/ArrayAssignmentTest.php +++ b/tests/ArrayAssignmentTest.php @@ -31,7 +31,7 @@ class ArrayAssignmentTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -1078,7 +1078,7 @@ class ArrayAssignmentTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/AssertTest.php b/tests/AssertTest.php index 588823d67..68e098f67 100644 --- a/tests/AssertTest.php +++ b/tests/AssertTest.php @@ -7,7 +7,7 @@ class AssertTest extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -577,7 +577,7 @@ class AssertTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/AssignmentTest.php b/tests/AssignmentTest.php index cf7177373..673be223e 100644 --- a/tests/AssignmentTest.php +++ b/tests/AssignmentTest.php @@ -7,7 +7,7 @@ class AssignmentTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -49,7 +49,7 @@ class AssignmentTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/BinaryOperationTest.php b/tests/BinaryOperationTest.php index e9b4b7f6f..8864f6597 100644 --- a/tests/BinaryOperationTest.php +++ b/tests/BinaryOperationTest.php @@ -81,7 +81,7 @@ class BinaryOperationTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -201,7 +201,7 @@ class BinaryOperationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/CallableTest.php b/tests/CallableTest.php index 3c30fdd3a..1715e91e1 100644 --- a/tests/CallableTest.php +++ b/tests/CallableTest.php @@ -7,7 +7,7 @@ class CallableTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -761,7 +761,7 @@ class CallableTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ClassLoadOrderTest.php b/tests/ClassLoadOrderTest.php index 77d0afd64..9cabac2d4 100644 --- a/tests/ClassLoadOrderTest.php +++ b/tests/ClassLoadOrderTest.php @@ -7,7 +7,7 @@ class ClassLoadOrderTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -119,7 +119,7 @@ class ClassLoadOrderTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ClassScopeTest.php b/tests/ClassScopeTest.php index 4e4109e33..0f90e8fa8 100644 --- a/tests/ClassScopeTest.php +++ b/tests/ClassScopeTest.php @@ -7,7 +7,7 @@ class ClassScopeTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -136,7 +136,7 @@ class ClassScopeTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ClassStringTest.php b/tests/ClassStringTest.php index 8ac05fc3d..f1ff7e3ca 100644 --- a/tests/ClassStringTest.php +++ b/tests/ClassStringTest.php @@ -58,7 +58,7 @@ class ClassStringTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -531,7 +531,7 @@ class ClassStringTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ClassTest.php b/tests/ClassTest.php index b62fcc649..c00c952e7 100644 --- a/tests/ClassTest.php +++ b/tests/ClassTest.php @@ -45,7 +45,7 @@ class ClassTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -375,7 +375,7 @@ class ClassTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ConstantTest.php b/tests/ConstantTest.php index 7f4df4a2b..f51ad1721 100644 --- a/tests/ConstantTest.php +++ b/tests/ConstantTest.php @@ -7,7 +7,7 @@ class ConstantTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -378,7 +378,7 @@ class ConstantTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { @@ -478,7 +478,7 @@ class ConstantTest extends TestCase namespace C { echo A\B; }', - 'UndefinedConstant', + 'error_message' => 'UndefinedConstant', ], ]; } diff --git a/tests/DeprecatedAnnotationTest.php b/tests/DeprecatedAnnotationTest.php index 7e3b776e2..994976d0c 100644 --- a/tests/DeprecatedAnnotationTest.php +++ b/tests/DeprecatedAnnotationTest.php @@ -7,7 +7,7 @@ class DeprecatedAnnotationTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -26,7 +26,7 @@ class DeprecatedAnnotationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/EmptyTest.php b/tests/EmptyTest.php index 83cd16a4b..6df8c3e70 100644 --- a/tests/EmptyTest.php +++ b/tests/EmptyTest.php @@ -7,7 +7,7 @@ class EmptyTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -339,7 +339,7 @@ class EmptyTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/EnumTest.php b/tests/EnumTest.php index 58349bb8c..3f8d304d0 100644 --- a/tests/EnumTest.php +++ b/tests/EnumTest.php @@ -7,7 +7,7 @@ class EnumTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -105,7 +105,7 @@ class EnumTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ForbiddenCodeTest.php b/tests/ForbiddenCodeTest.php index 1e4309b50..7480c7986 100644 --- a/tests/ForbiddenCodeTest.php +++ b/tests/ForbiddenCodeTest.php @@ -7,7 +7,7 @@ class ForbiddenCodeTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { @@ -31,7 +31,7 @@ class ForbiddenCodeTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { diff --git a/tests/FunctionCallTest.php b/tests/FunctionCallTest.php index 1dfc298a8..ba5c84c7a 100644 --- a/tests/FunctionCallTest.php +++ b/tests/FunctionCallTest.php @@ -7,7 +7,7 @@ class FunctionCallTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -1480,7 +1480,7 @@ class FunctionCallTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/InterfaceTest.php b/tests/InterfaceTest.php index f35f68290..b35e6f0d7 100644 --- a/tests/InterfaceTest.php +++ b/tests/InterfaceTest.php @@ -7,7 +7,7 @@ class InterfaceTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -529,7 +529,7 @@ class InterfaceTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/InternalAnnotationTest.php b/tests/InternalAnnotationTest.php index 404f701d9..ac9603429 100644 --- a/tests/InternalAnnotationTest.php +++ b/tests/InternalAnnotationTest.php @@ -7,7 +7,7 @@ class InternalAnnotationTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -177,7 +177,7 @@ class InternalAnnotationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/IssetTest.php b/tests/IssetTest.php index 37ee3c56f..82db5c3ce 100644 --- a/tests/IssetTest.php +++ b/tests/IssetTest.php @@ -7,7 +7,7 @@ class IssetTest extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -519,7 +519,7 @@ class IssetTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/IssueSuppressionTest.php b/tests/IssueSuppressionTest.php index c13fa6b0b..588729f5c 100644 --- a/tests/IssueSuppressionTest.php +++ b/tests/IssueSuppressionTest.php @@ -7,7 +7,7 @@ class IssueSuppressionTest extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -83,7 +83,7 @@ class IssueSuppressionTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ListTest.php b/tests/ListTest.php index 498e213d9..2ab8fa0f4 100644 --- a/tests/ListTest.php +++ b/tests/ListTest.php @@ -7,7 +7,7 @@ class ListTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -71,7 +71,7 @@ class ListTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Loop/DoTest.php b/tests/Loop/DoTest.php index 820e2b0bd..81accac27 100644 --- a/tests/Loop/DoTest.php +++ b/tests/Loop/DoTest.php @@ -9,7 +9,7 @@ class DoTest extends \Psalm\Tests\TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -296,7 +296,7 @@ class DoTest extends \Psalm\Tests\TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Loop/ForTest.php b/tests/Loop/ForTest.php index 18c3bb3b7..7d2d401ca 100644 --- a/tests/Loop/ForTest.php +++ b/tests/Loop/ForTest.php @@ -9,7 +9,7 @@ class ForTest extends \Psalm\Tests\TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -112,7 +112,7 @@ class ForTest extends \Psalm\Tests\TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Loop/ForeachTest.php b/tests/Loop/ForeachTest.php index d68872d1a..acf9be7c8 100644 --- a/tests/Loop/ForeachTest.php +++ b/tests/Loop/ForeachTest.php @@ -9,7 +9,7 @@ class ForeachTest extends \Psalm\Tests\TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -850,7 +850,7 @@ class ForeachTest extends \Psalm\Tests\TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Loop/WhileTest.php b/tests/Loop/WhileTest.php index cff997754..b26df6639 100644 --- a/tests/Loop/WhileTest.php +++ b/tests/Loop/WhileTest.php @@ -9,7 +9,7 @@ class WhileTest extends \Psalm\Tests\TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -332,7 +332,7 @@ class WhileTest extends \Psalm\Tests\TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/MagicMethodAnnotationTest.php b/tests/MagicMethodAnnotationTest.php index 7c6dc2b34..9f1f3d240 100644 --- a/tests/MagicMethodAnnotationTest.php +++ b/tests/MagicMethodAnnotationTest.php @@ -135,7 +135,7 @@ class MagicMethodAnnotationTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -432,7 +432,7 @@ class MagicMethodAnnotationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/MagicPropertyTest.php b/tests/MagicPropertyTest.php index 080356a9e..d39c4887a 100644 --- a/tests/MagicPropertyTest.php +++ b/tests/MagicPropertyTest.php @@ -7,7 +7,7 @@ class MagicPropertyTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -503,7 +503,7 @@ class MagicPropertyTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/MethodCallTest.php b/tests/MethodCallTest.php index 8e76b8bfd..5124e337c 100644 --- a/tests/MethodCallTest.php +++ b/tests/MethodCallTest.php @@ -7,7 +7,7 @@ class MethodCallTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -295,7 +295,7 @@ class MethodCallTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/MethodSignatureTest.php b/tests/MethodSignatureTest.php index 574b95543..16fac1992 100644 --- a/tests/MethodSignatureTest.php +++ b/tests/MethodSignatureTest.php @@ -90,7 +90,7 @@ class MethodSignatureTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -400,7 +400,7 @@ class MethodSignatureTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/NamespaceTest.php b/tests/NamespaceTest.php index 40580d6e7..663bb1e0b 100644 --- a/tests/NamespaceTest.php +++ b/tests/NamespaceTest.php @@ -7,7 +7,7 @@ class NamespaceTest extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -71,7 +71,7 @@ class NamespaceTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Php40Test.php b/tests/Php40Test.php index ed630e30a..89cd0ebf0 100644 --- a/tests/Php40Test.php +++ b/tests/Php40Test.php @@ -6,7 +6,7 @@ class Php40Test extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { diff --git a/tests/Php55Test.php b/tests/Php55Test.php index 95b229729..72f00bf16 100644 --- a/tests/Php55Test.php +++ b/tests/Php55Test.php @@ -6,7 +6,7 @@ class Php55Test extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { diff --git a/tests/Php56Test.php b/tests/Php56Test.php index e42bcb71e..d39ca96ad 100644 --- a/tests/Php56Test.php +++ b/tests/Php56Test.php @@ -7,7 +7,7 @@ class Php56Test extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -265,7 +265,7 @@ class Php56Test extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Php70Test.php b/tests/Php70Test.php index 39f993130..a8d4ef712 100644 --- a/tests/Php70Test.php +++ b/tests/Php70Test.php @@ -7,7 +7,7 @@ class Php70Test extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -353,7 +353,7 @@ class Php70Test extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Php71Test.php b/tests/Php71Test.php index 009a1df00..131d5c66c 100644 --- a/tests/Php71Test.php +++ b/tests/Php71Test.php @@ -7,7 +7,7 @@ class Php71Test extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -248,7 +248,7 @@ class Php71Test extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Plugin/FunctionPlugin.php b/tests/Plugin/FunctionPlugin.php index d0ace2a2f..ddd493516 100644 --- a/tests/Plugin/FunctionPlugin.php +++ b/tests/Plugin/FunctionPlugin.php @@ -4,6 +4,7 @@ namespace Psalm\Test\Plugin; use Psalm\Plugin; use SimpleXMLElement; +/** @psalm-suppress UnusedClass */ class FunctionPlugin implements \Psalm\Plugin\PluginEntryPointInterface { /** @return void */ diff --git a/tests/Plugin/MethodPlugin.php b/tests/Plugin/MethodPlugin.php index 86918cf1f..5345feb2b 100644 --- a/tests/Plugin/MethodPlugin.php +++ b/tests/Plugin/MethodPlugin.php @@ -4,6 +4,7 @@ namespace Psalm\Test\Plugin; use Psalm\Plugin; use SimpleXMLElement; +/** @psalm-suppress UnusedClass */ class MethodPlugin implements \Psalm\Plugin\PluginEntryPointInterface { /** @return void */ diff --git a/tests/Plugin/PropertyPlugin.php b/tests/Plugin/PropertyPlugin.php index 5313ccbf5..dbcdd402f 100644 --- a/tests/Plugin/PropertyPlugin.php +++ b/tests/Plugin/PropertyPlugin.php @@ -4,6 +4,7 @@ namespace Psalm\Test\Plugin; use Psalm\Plugin; use SimpleXMLElement; +/** @psalm-suppress UnusedClass */ class PropertyPlugin implements \Psalm\Plugin\PluginEntryPointInterface { /** @return void */ diff --git a/tests/ProjectCheckerTest.php b/tests/ProjectCheckerTest.php index 6aed6511f..b15112946 100644 --- a/tests/ProjectCheckerTest.php +++ b/tests/ProjectCheckerTest.php @@ -40,39 +40,6 @@ class ProjectAnalyzerTest extends TestCase $this->file_provider = new Provider\FakeFileProvider(); } - /** - * @return string[] - * @psalm-return array - */ - 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 * diff --git a/tests/PropertyTypeTest.php b/tests/PropertyTypeTest.php index c8b2b9757..8c6ebda65 100644 --- a/tests/PropertyTypeTest.php +++ b/tests/PropertyTypeTest.php @@ -147,7 +147,7 @@ class PropertyTypeTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -1472,7 +1472,7 @@ class PropertyTypeTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/RedundantConditionTest.php b/tests/RedundantConditionTest.php index 3421b18e2..05dfbc069 100644 --- a/tests/RedundantConditionTest.php +++ b/tests/RedundantConditionTest.php @@ -7,7 +7,7 @@ class RedundantConditionTest extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -553,7 +553,7 @@ class RedundantConditionTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ReferenceConstraintTest.php b/tests/ReferenceConstraintTest.php index ee2a3627b..a19d61bd3 100644 --- a/tests/ReferenceConstraintTest.php +++ b/tests/ReferenceConstraintTest.php @@ -7,7 +7,7 @@ class ReferenceConstraintTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -86,7 +86,7 @@ class ReferenceConstraintTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ReturnTypeTest.php b/tests/ReturnTypeTest.php index 487b5ef72..e7fd9c581 100644 --- a/tests/ReturnTypeTest.php +++ b/tests/ReturnTypeTest.php @@ -7,7 +7,7 @@ class ReturnTypeTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -591,7 +591,7 @@ class ReturnTypeTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ScopeTest.php b/tests/ScopeTest.php index 04b40aad6..02091a80b 100644 --- a/tests/ScopeTest.php +++ b/tests/ScopeTest.php @@ -7,7 +7,7 @@ class ScopeTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -239,7 +239,7 @@ class ScopeTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/SwitchTypeTest.php b/tests/SwitchTypeTest.php index 8b024b113..837fa1e57 100644 --- a/tests/SwitchTypeTest.php +++ b/tests/SwitchTypeTest.php @@ -7,7 +7,7 @@ class SwitchTypeTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -513,7 +513,7 @@ class SwitchTypeTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Template/TemplateExtendsTest.php b/tests/Template/TemplateExtendsTest.php index 8f986bea3..0de83623c 100644 --- a/tests/Template/TemplateExtendsTest.php +++ b/tests/Template/TemplateExtendsTest.php @@ -10,7 +10,7 @@ class TemplateExtendsTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -1367,7 +1367,7 @@ class TemplateExtendsTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Template/TemplateTest.php b/tests/Template/TemplateTest.php index d40055f4b..ff16e82f0 100644 --- a/tests/Template/TemplateTest.php +++ b/tests/Template/TemplateTest.php @@ -10,7 +10,7 @@ class TemplateTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -1715,7 +1715,7 @@ class TemplateTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/ToStringTest.php b/tests/ToStringTest.php index 227ae9145..e85200a79 100644 --- a/tests/ToStringTest.php +++ b/tests/ToStringTest.php @@ -7,7 +7,7 @@ class ToStringTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -94,7 +94,7 @@ class ToStringTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/TraitTest.php b/tests/TraitTest.php index f0c2062a5..567f44b35 100644 --- a/tests/TraitTest.php +++ b/tests/TraitTest.php @@ -7,7 +7,7 @@ class TraitTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -829,7 +829,7 @@ class TraitTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/Traits/InvalidCodeAnalysisTestTrait.php b/tests/Traits/InvalidCodeAnalysisTestTrait.php index 7114f77da..8714ca55e 100644 --- a/tests/Traits/InvalidCodeAnalysisTestTrait.php +++ b/tests/Traits/InvalidCodeAnalysisTestTrait.php @@ -7,7 +7,7 @@ use Psalm\Context; trait InvalidCodeAnalysisTestTrait { /** - * @return array + * @return iterable */ abstract public function providerInvalidCodeParse(); diff --git a/tests/Traits/ValidCodeAnalysisTestTrait.php b/tests/Traits/ValidCodeAnalysisTestTrait.php index e0a4381bf..e0bce4113 100644 --- a/tests/Traits/ValidCodeAnalysisTestTrait.php +++ b/tests/Traits/ValidCodeAnalysisTestTrait.php @@ -7,7 +7,7 @@ use Psalm\Context; trait ValidCodeAnalysisTestTrait { /** - * @return array + * @return iterable,error_levels?:string[]}> */ abstract public function providerValidCodeParse(); diff --git a/tests/TryCatchTest.php b/tests/TryCatchTest.php index 69f0bb5c5..e7f3a97df 100644 --- a/tests/TryCatchTest.php +++ b/tests/TryCatchTest.php @@ -7,7 +7,7 @@ class TryCatchTest extends TestCase use Traits\InvalidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -206,7 +206,7 @@ class TryCatchTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/TypeAlgebraTest.php b/tests/TypeAlgebraTest.php index bd476bf40..130d9458e 100644 --- a/tests/TypeAlgebraTest.php +++ b/tests/TypeAlgebraTest.php @@ -7,7 +7,7 @@ class TypeAlgebraTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -906,7 +906,7 @@ class TypeAlgebraTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/TypeAnnotationTest.php b/tests/TypeAnnotationTest.php index 75b086d33..90e74bd5b 100644 --- a/tests/TypeAnnotationTest.php +++ b/tests/TypeAnnotationTest.php @@ -7,7 +7,7 @@ class TypeAnnotationTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -159,7 +159,7 @@ class TypeAnnotationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/TypeCombinationTest.php b/tests/TypeCombinationTest.php index 660ccfeb2..4b9dd4d7d 100644 --- a/tests/TypeCombinationTest.php +++ b/tests/TypeCombinationTest.php @@ -31,7 +31,7 @@ class TypeCombinationTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { diff --git a/tests/TypeReconciliationTest.php b/tests/TypeReconciliationTest.php index aec390a1c..06a87e909 100644 --- a/tests/TypeReconciliationTest.php +++ b/tests/TypeReconciliationTest.php @@ -255,7 +255,7 @@ class TypeReconciliationTest extends TestCase } /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -1287,7 +1287,7 @@ class TypeReconciliationTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { diff --git a/tests/TypeTest.php b/tests/TypeTest.php index 3a15a342b..ea0fc25ee 100644 --- a/tests/TypeTest.php +++ b/tests/TypeTest.php @@ -7,7 +7,7 @@ class TypeTest extends TestCase use Traits\ValidCodeAnalysisTestTrait; /** - * @return array + * @return iterable,error_levels?:string[]}> */ public function providerValidCodeParse() { @@ -994,7 +994,7 @@ class TypeTest extends TestCase } /** - * @return array + * @return iterable */ public function providerInvalidCodeParse() { @@ -1132,7 +1132,7 @@ class TypeTest extends TestCase $one->fooFoo(); } }', - 'error_mesage' => 'PossiblyNullReference', + 'error_message' => 'PossiblyNullReference', ], 'nullableMethodWithGuardedNestedIncompleteRedefinition' => [ ',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 */ public function providerInvalidCodeParse() { diff --git a/tests/VariadicTest.php b/tests/VariadicTest.php index fa02ffc90..294625ddc 100644 --- a/tests/VariadicTest.php +++ b/tests/VariadicTest.php @@ -32,7 +32,7 @@ class VariadicTest extends TestCase } /** - * @return array + * @return iterable,2?:string[]}> */ public function providerValidCodeParse() {