From c7f21b1838344447a1a20b48565114ba673ece92 Mon Sep 17 00:00:00 2001 From: Thomas Meschke Date: Mon, 18 Nov 2024 12:52:21 +0100 Subject: [PATCH] fix failing jobs --- system/Files/File.php | 4 +++- tests/system/Files/FileTest.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/system/Files/File.php b/system/Files/File.php index 4c1757a6b538..6a2529cac149 100644 --- a/system/Files/File.php +++ b/system/Files/File.php @@ -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) @@ -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) @@ -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); } diff --git a/tests/system/Files/FileTest.php b/tests/system/Files/FileTest.php index c8a15fce29af..e0105fb011a1 100644 --- a/tests/system/Files/FileTest.php +++ b/tests/system/Files/FileTest.php @@ -170,7 +170,7 @@ public function testGetDestination(): void } /** - * @return array> + * @return array> */ public static function provideGetSizeData() {