From c2c86bd4c119aef9acad3c1cc4440b8d3a5922cb Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 2 Apr 2024 11:05:10 +0200 Subject: [PATCH 1/3] Type arrays in TestSuite --- .psalm/baseline.xml | 10 +--------- src/Framework/TestSuite.php | 6 ++++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.psalm/baseline.xml b/.psalm/baseline.xml index af95aba47d9..0b96fc99077 100644 --- a/.psalm/baseline.xml +++ b/.psalm/baseline.xml @@ -1,5 +1,5 @@ - + @@ -563,14 +563,6 @@ name]]> - - providedTests]]> - requiredTests]]> - - - ]]> - ]]> - diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php index 1b2113cb7de..08c8874df8b 100644 --- a/src/Framework/TestSuite.php +++ b/src/Framework/TestSuite.php @@ -64,12 +64,18 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test * @psalm-var array> */ private array $groups = []; + /** + * @psalm-var list|null + */ private ?array $requiredTests = null; /** * @psalm-var list */ private array $tests = []; + /** + * @psalm-var list|null + */ private ?array $providedTests = null; private ?Factory $iteratorFilter = null; From 8bc635b994237668944f29b6879f818d5cbfe6b9 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 2 Apr 2024 11:10:14 +0200 Subject: [PATCH 2/3] use "?" over union-with-null --- src/Framework/TestSuite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php index 08c8874df8b..f676d191b23 100644 --- a/src/Framework/TestSuite.php +++ b/src/Framework/TestSuite.php @@ -65,7 +65,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test */ private array $groups = []; /** - * @psalm-var list|null + * @psalm-var ?list */ private ?array $requiredTests = null; @@ -74,7 +74,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test */ private array $tests = []; /** - * @psalm-var list|null + * @psalm-var ?list */ private ?array $providedTests = null; private ?Factory $iteratorFilter = null; From b24c32d0bca9e16979dd486d16ca64261bddbdf9 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 2 Apr 2024 11:10:54 +0200 Subject: [PATCH 3/3] cs --- src/Framework/TestSuite.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php index f676d191b23..ad40f4282b4 100644 --- a/src/Framework/TestSuite.php +++ b/src/Framework/TestSuite.php @@ -63,7 +63,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test /** * @psalm-var array> */ - private array $groups = []; + private array $groups = []; + /** * @psalm-var ?list */ @@ -72,7 +73,8 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test /** * @psalm-var list */ - private array $tests = []; + private array $tests = []; + /** * @psalm-var ?list */