Skip to content

Commit

Permalink
fix failing jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMeschke committed Nov 18, 2024
1 parent a186c0f commit c7f21b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion system/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function getSize()
* Retrieve the file size by unit, calculated in IEC standards with 1024 as base value.
*
* @phpstan-param positive-int $precision
*
* @return false|int|string
*/
public function getSizeByUnitBinary(FileSizeUnit $unit = FileSizeUnit::B, int $precision = 3)
Expand All @@ -85,6 +86,7 @@ public function getSizeByUnitBinary(FileSizeUnit $unit = FileSizeUnit::B, int $p
* Retrieve the file size by unit, calculated in metric standards with 1000 as base value.
*
* @phpstan-param positive-int $precision
*
* @return false|int|string
*/
public function getSizeByUnitMetric(FileSizeUnit $unit = FileSizeUnit::B, int $precision = 3)
Expand Down Expand Up @@ -223,7 +225,7 @@ protected function getSizeByUnitInternal(int $fileSizeBase, FileSizeUnit $unit,
$divider = $fileSizeBase ** $exponent;
$size = $this->getSize() / $divider;

if($unit !== FileSizeUnit::B) {
if ($unit !== FileSizeUnit::B) {
$size = number_format($size, $precision);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Files/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function testGetDestination(): void
}

/**
* @return array<string, array<int, CodeIgniter\Files\FileSizeUnit>>
* @return array<string, array<int, FileSizeUnit>>
*/
public static function provideGetSizeData()
{
Expand Down

0 comments on commit c7f21b1

Please sign in to comment.