Skip to content

Commit b3a5b52

Browse files
authored
[CLEANUP] Rector: Adds param type declaration based on PHPUnit provider return type declaration (#600)
This applies the rule AddParamTypeBasedOnPHPUnitDataProviderRector. For Details see: https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#addparamtypebasedonphpunitdataproviderrector Signed-off-by: Daniel Ziegenberg <[email protected]>
1 parent 0a5c594 commit b3a5b52

File tree

2 files changed

+10
-38
lines changed

2 files changed

+10
-38
lines changed

tests/CSSList/AtRuleBlockListTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,9 @@ public function implementsCommentable(): void
8080
/**
8181
* @test
8282
*
83-
* @param string $css
84-
*
8583
* @dataProvider provideMinWidthMediaRule
8684
*/
87-
public function parsesRuleNameOfMediaQueries($css): void
85+
public function parsesRuleNameOfMediaQueries(string $css): void
8886
{
8987
$contents = (new Parser($css))->parse()->getContents();
9088
$atRuleBlockList = $contents[0];
@@ -95,11 +93,9 @@ public function parsesRuleNameOfMediaQueries($css): void
9593
/**
9694
* @test
9795
*
98-
* @param string $css
99-
*
10096
* @dataProvider provideMinWidthMediaRule
10197
*/
102-
public function parsesArgumentsOfMediaQueries($css): void
98+
public function parsesArgumentsOfMediaQueries(string $css): void
10399
{
104100
$contents = (new Parser($css))->parse()->getContents();
105101
$atRuleBlockList = $contents[0];

tests/RuleSet/DeclarationBlockTest.php

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@
1313
final class DeclarationBlockTest extends TestCase
1414
{
1515
/**
16-
* @param string $sCss
17-
* @param string $sExpected
18-
*
1916
* @dataProvider expandBorderShorthandProvider
2017
*
2118
* @test
2219
*/
23-
public function expandBorderShorthand($sCss, $sExpected): void
20+
public function expandBorderShorthand(string $sCss, string $sExpected): void
2421
{
2522
$oParser = new Parser($sCss);
2623
$oDoc = $oParser->parse();
@@ -46,14 +43,11 @@ public static function expandBorderShorthandProvider(): array
4643
}
4744

4845
/**
49-
* @param string $sCss
50-
* @param string $sExpected
51-
*
5246
* @dataProvider expandFontShorthandProvider
5347
*
5448
* @test
5549
*/
56-
public function expandFontShorthand($sCss, $sExpected): void
50+
public function expandFontShorthand(string $sCss, string $sExpected): void
5751
{
5852
$oParser = new Parser($sCss);
5953
$oDoc = $oParser->parse();
@@ -102,14 +96,11 @@ public static function expandFontShorthandProvider(): array
10296
}
10397

10498
/**
105-
* @param string $sCss
106-
* @param string $sExpected
107-
*
10899
* @dataProvider expandBackgroundShorthandProvider
109100
*
110101
* @test
111102
*/
112-
public function expandBackgroundShorthand($sCss, $sExpected): void
103+
public function expandBackgroundShorthand(string $sCss, string $sExpected): void
113104
{
114105
$oParser = new Parser($sCss);
115106
$oDoc = $oParser->parse();
@@ -155,14 +146,11 @@ public static function expandBackgroundShorthandProvider(): array
155146
}
156147

157148
/**
158-
* @param string $sCss
159-
* @param string $sExpected
160-
*
161149
* @dataProvider expandDimensionsShorthandProvider
162150
*
163151
* @test
164152
*/
165-
public function expandDimensionsShorthand($sCss, $sExpected): void
153+
public function expandDimensionsShorthand(string $sCss, string $sExpected): void
166154
{
167155
$oParser = new Parser($sCss);
168156
$oDoc = $oParser->parse();
@@ -193,14 +181,11 @@ public static function expandDimensionsShorthandProvider(): array
193181
}
194182

195183
/**
196-
* @param string $sCss
197-
* @param string $sExpected
198-
*
199184
* @dataProvider createBorderShorthandProvider
200185
*
201186
* @test
202187
*/
203-
public function createBorderShorthand($sCss, $sExpected): void
188+
public function createBorderShorthand(string $sCss, string $sExpected): void
204189
{
205190
$oParser = new Parser($sCss);
206191
$oDoc = $oParser->parse();
@@ -224,14 +209,11 @@ public static function createBorderShorthandProvider(): array
224209
}
225210

226211
/**
227-
* @param string $sCss
228-
* @param string $sExpected
229-
*
230212
* @dataProvider createFontShorthandProvider
231213
*
232214
* @test
233215
*/
234-
public function createFontShorthand($sCss, $sExpected): void
216+
public function createFontShorthand(string $sCss, string $sExpected): void
235217
{
236218
$oParser = new Parser($sCss);
237219
$oDoc = $oParser->parse();
@@ -267,14 +249,11 @@ public static function createFontShorthandProvider(): array
267249
}
268250

269251
/**
270-
* @param string $sCss
271-
* @param string $sExpected
272-
*
273252
* @dataProvider createDimensionsShorthandProvider
274253
*
275254
* @test
276255
*/
277-
public function createDimensionsShorthand($sCss, $sExpected): void
256+
public function createDimensionsShorthand(string $sCss, string $sExpected): void
278257
{
279258
$oParser = new Parser($sCss);
280259
$oDoc = $oParser->parse();
@@ -305,14 +284,11 @@ public static function createDimensionsShorthandProvider(): array
305284
}
306285

307286
/**
308-
* @param string $sCss
309-
* @param string $sExpected
310-
*
311287
* @dataProvider createBackgroundShorthandProvider
312288
*
313289
* @test
314290
*/
315-
public function createBackgroundShorthand($sCss, $sExpected): void
291+
public function createBackgroundShorthand(string $sCss, string $sExpected): void
316292
{
317293
$oParser = new Parser($sCss);
318294
$oDoc = $oParser->parse();

0 commit comments

Comments
 (0)