Skip to content

Commit

Permalink
fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMeschke committed Nov 18, 2024
1 parent 0e4f240 commit 3ad691a
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions tests/system/Files/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ public function testGetSizeReturnsBytes(): void
$this->assertSame($size, $file->getSizeByUnit('b'));
}

/**
* @dataProvider provideGetSizeData
*/
#[\PHPUnit\Framework\Attributes\DataProvider('provideGetSizeData')]
public function testGetSizeBinary(FileSizeUnit $unit): void
{
$divider = 1024 ** $unit->value;
Expand All @@ -131,9 +129,7 @@ public function testGetSizeBinaryBytes(): void
$this->assertSame($size, $file->getSizeByUnitBinary(FileSizeUnit::B));
}

/**
* @dataProvider provideGetSizeData
*/
#[\PHPUnit\Framework\Attributes\DataProvider('provideGetSizeData')]
public function testGetSizeMetric(FileSizeUnit $unit): void
{
$divider = 1000 ** $unit->value;
Expand Down Expand Up @@ -173,22 +169,22 @@ public function testGetDestination(): void
}

/**
* @return Array<string, Array<int>>
* @return @return array<string, list<int>>
*/
public static function provideGetSizeData()
public static function provideGetSizeData(): iterable

Check failure on line 174 in tests/system/Files/FileTest.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis

Method CodeIgniter\Files\FileTest::provideGetSizeData() return type has no value type specified in iterable type iterable.

Check failure on line 174 in tests/system/Files/FileTest.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis

PHPDoc tag @return has invalid value (@return array<string, list<int>>): Unexpected token "@return", expected type at offset 19
{
return [
'returns KB binary' => [
FileSizeUnit::KB
FileSizeUnit::KB,
],
'returns MB binary' => [
FileSizeUnit::KB
FileSizeUnit::MB,
],
'returns GB binary' => [
FileSizeUnit::KB
FileSizeUnit::GB,
],
'returns TB binary' => [
FileSizeUnit::KB
FileSizeUnit::TB,
],
];
}
Expand Down

0 comments on commit 3ad691a

Please sign in to comment.