Skip to content

Commit

Permalink
[TASK] Use more native types in the tests
Browse files Browse the repository at this point in the history
All glory to the Rector!
  • Loading branch information
oliverklee committed Nov 10, 2024
1 parent 9e25e83 commit c75af9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/Support/Traits/CssDataProviders.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static function (string $css): string {
/**
* @return array<string, array{0: string, 1: string}>
*/
public function provideCssNeedleFoundInLargerHaystack()
public function provideCssNeedleFoundInLargerHaystack(): array
{
return [
'needle at start of haystack' => ['p { color: green; }', 'p { color: green; } a { color: blue; }'],
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/CssInlinerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3828,7 +3828,7 @@ public function matchingUninlinableSelectorsDataProvider(): array
public function getMatchingUninlinableSelectorsReturnsMatchingUninlinableSelectors(array $selectors): void
{
$css = \implode(' ', \array_map(
static function ($selector) {
static function (string $selector): string {
return $selector . ' { color: green; }';
},
$selectors
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/HtmlProcessor/AbstractHtmlProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ public function nonXmlSelfClosingTagDataProvider(): array
*
* @return array{0:string, 1:string}
*/
static function (array $dataset) {
static function (array $dataset): array {
$dataset[0] = \str_replace('/>', '>', $dataset[0]);
return $dataset;
},
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Support/Traits/AssertCssTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function assertContainsCssCountPassesTestWhenExpected(int $count, string
/**
* @return array<string, array{0: int, 1: string, 2: string}>
*/
public function providePassingCssCountData()
public function providePassingCssCountData(): array
{
return [
'not finding needle when asked not to' => [0, 'a', 'b'],
Expand All @@ -125,7 +125,7 @@ public function assertContainsCssCountFailsTestWhenExpected(int $count, string $
/**
* @return array<string, array{0: int, 1: string, 2: string}>
*/
public function provideFailingCssCountData()
public function provideFailingCssCountData(): array
{
return [
'expecting none but finding some' => [0, 'a', 'a'],
Expand Down

0 comments on commit c75af9f

Please sign in to comment.