Skip to content

Commit

Permalink
add missing return type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMeschke committed Nov 18, 2024
1 parent 34b3cfd commit 0f32963
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions system/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ public function getDestination(string $destination, string $delimiter = '_', int
return $destination;
}

/**
* @return false|int|string
*/
protected function getSizeByUnitInternal(int $fileSizeBase, FileSizeUnit $unit, int $precision)
{
$exponent = $unit->value;
Expand Down
3 changes: 3 additions & 0 deletions tests/system/Files/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ public function testGetDestination(): void
unlink(SYSTEMPATH . 'Common_Copy_5.php');
}

/**
* @return Array<string, Array<int>>
*/
public static function provideGetSizeData()
{
return [

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

View workflow job for this annotation

GitHub Actions / PHP Static Analysis

Method CodeIgniter\Files\FileTest::provideGetSizeData() should return array<string, array<int>> but returns array<string, array<int, CodeIgniter\Files\FileSizeUnit::KB>>.
Expand Down

0 comments on commit 0f32963

Please sign in to comment.