Skip to content

[CLEANUP] Rector: Adds param type declaration based on PHPUnit provider return type declaration #600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions tests/CSSList/AtRuleBlockListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ public function implementsCommentable(): void
/**
* @test
*
* @param string $css
*
* @dataProvider provideMinWidthMediaRule
*/
public function parsesRuleNameOfMediaQueries($css): void
public function parsesRuleNameOfMediaQueries(string $css): void
{
$contents = (new Parser($css))->parse()->getContents();
$atRuleBlockList = $contents[0];
Expand All @@ -95,11 +93,9 @@ public function parsesRuleNameOfMediaQueries($css): void
/**
* @test
*
* @param string $css
*
* @dataProvider provideMinWidthMediaRule
*/
public function parsesArgumentsOfMediaQueries($css): void
public function parsesArgumentsOfMediaQueries(string $css): void
{
$contents = (new Parser($css))->parse()->getContents();
$atRuleBlockList = $contents[0];
Expand Down
40 changes: 8 additions & 32 deletions tests/RuleSet/DeclarationBlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
final class DeclarationBlockTest extends TestCase
{
/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider expandBorderShorthandProvider
*
* @test
*/
public function expandBorderShorthand($sCss, $sExpected): void
public function expandBorderShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand All @@ -46,14 +43,11 @@ public static function expandBorderShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider expandFontShorthandProvider
*
* @test
*/
public function expandFontShorthand($sCss, $sExpected): void
public function expandFontShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand Down Expand Up @@ -102,14 +96,11 @@ public static function expandFontShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider expandBackgroundShorthandProvider
*
* @test
*/
public function expandBackgroundShorthand($sCss, $sExpected): void
public function expandBackgroundShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand Down Expand Up @@ -155,14 +146,11 @@ public static function expandBackgroundShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider expandDimensionsShorthandProvider
*
* @test
*/
public function expandDimensionsShorthand($sCss, $sExpected): void
public function expandDimensionsShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand Down Expand Up @@ -193,14 +181,11 @@ public static function expandDimensionsShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider createBorderShorthandProvider
*
* @test
*/
public function createBorderShorthand($sCss, $sExpected): void
public function createBorderShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand All @@ -224,14 +209,11 @@ public static function createBorderShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider createFontShorthandProvider
*
* @test
*/
public function createFontShorthand($sCss, $sExpected): void
public function createFontShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand Down Expand Up @@ -267,14 +249,11 @@ public static function createFontShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider createDimensionsShorthandProvider
*
* @test
*/
public function createDimensionsShorthand($sCss, $sExpected): void
public function createDimensionsShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand Down Expand Up @@ -305,14 +284,11 @@ public static function createDimensionsShorthandProvider(): array
}

/**
* @param string $sCss
* @param string $sExpected
*
* @dataProvider createBackgroundShorthandProvider
*
* @test
*/
public function createBackgroundShorthand($sCss, $sExpected): void
public function createBackgroundShorthand(string $sCss, string $sExpected): void
{
$oParser = new Parser($sCss);
$oDoc = $oParser->parse();
Expand Down