Skip to content

Commit 5d342d3

Browse files
authored
[CLEANUP] Tighten type annotations in AtRuleBlockListTest (#1555)
1 parent fa5eba4 commit 5d342d3

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

tests/CSSList/AtRuleBlockListTest.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
final class AtRuleBlockListTest extends TestCase
1818
{
1919
/**
20-
* @return array<string, array{0: string}>
20+
* @return array<non-empty-string, array{0: non-empty-string}>
2121
*/
2222
public static function provideMinWidthMediaRule(): array
2323
{
@@ -28,7 +28,7 @@ public static function provideMinWidthMediaRule(): array
2828
}
2929

3030
/**
31-
* @return array<string, array{0: string}>
31+
* @return array<non-empty-string, array{0: non-empty-string}>
3232
*/
3333
public static function provideSyntacticallyCorrectAtRule(): array
3434
{
@@ -75,6 +75,8 @@ public static function provideSyntacticallyCorrectAtRule(): array
7575
/**
7676
* @test
7777
*
78+
* @param non-empty-string $css
79+
*
7880
* @dataProvider provideMinWidthMediaRule
7981
*/
8082
public function parsesRuleNameOfMediaQueries(string $css): void
@@ -89,6 +91,8 @@ public function parsesRuleNameOfMediaQueries(string $css): void
8991
/**
9092
* @test
9193
*
94+
* @param non-empty-string $css
95+
*
9296
* @dataProvider provideMinWidthMediaRule
9397
*/
9498
public function parsesArgumentsOfMediaQueries(string $css): void
@@ -103,6 +107,8 @@ public function parsesArgumentsOfMediaQueries(string $css): void
103107
/**
104108
* @test
105109
*
110+
* @param non-empty-string $css
111+
*
106112
* @dataProvider provideMinWidthMediaRule
107113
* @dataProvider provideSyntacticallyCorrectAtRule
108114
*/
@@ -114,7 +120,7 @@ public function parsesSyntacticallyCorrectAtRuleInStrictMode(string $css): void
114120
}
115121

116122
/**
117-
* @return array<string, array{0: string, 1: string, 2: string, 3: int}>
123+
* @return array<non-empty-string, array{0: non-empty-string, 1: non-empty-string, 2: string, 3: int<0, max>}>
118124
*/
119125
public static function provideAtRuleParsingData(): array
120126
{
@@ -159,7 +165,7 @@ public static function provideAtRuleParsingData(): array
159165
}
160166

161167
/**
162-
* @return array<string, array{0: string, 1: list<string>}>
168+
* @return array<non-empty-string, array{0: non-empty-string, 1: non-empty-list<non-empty-string>}>
163169
*/
164170
public static function provideAtRuleRenderingData(): array
165171
{
@@ -186,6 +192,10 @@ public static function provideAtRuleRenderingData(): array
186192
/**
187193
* @test
188194
*
195+
* @param non-empty-string $css
196+
* @param non-empty-string $expectedName
197+
* @param int<0, max> $expectedContentCount
198+
*
189199
* @dataProvider provideAtRuleParsingData
190200
*/
191201
public function parsesAtRuleBlockList(
@@ -208,7 +218,8 @@ public function parsesAtRuleBlockList(
208218
*
209219
* @dataProvider provideAtRuleRenderingData
210220
*
211-
* @param list<string> $expectedSubstrings
221+
* @param non-empty-string $css
222+
* @param non-empty-list<non-empty-string> $expectedSubstrings
212223
*/
213224
public function rendersAtRuleBlockListCorrectly(string $css, array $expectedSubstrings): void
214225
{

0 commit comments

Comments
 (0)