From 9d6f12419814da50300215741174f5eeb590b580 Mon Sep 17 00:00:00 2001 From: Arun Philip Date: Wed, 18 Dec 2024 23:12:25 -0500 Subject: [PATCH] improve some types --- src/ChurchCRM/Service/SystemService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChurchCRM/Service/SystemService.php b/src/ChurchCRM/Service/SystemService.php index 479792db2a..2c4628b8b8 100644 --- a/src/ChurchCRM/Service/SystemService.php +++ b/src/ChurchCRM/Service/SystemService.php @@ -155,7 +155,7 @@ public static function runTimerJobs(): void // Returns a file size limit in bytes based on the PHP upload_max_filesize // and post_max_size - public static function getMaxUploadFileSize($humanFormat = true) + public static function getMaxUploadFileSize(bool $humanFormat = true) { //select maximum upload size $max_upload = SystemService::parseSize(ini_get('upload_max_filesize')); @@ -183,7 +183,7 @@ private static function parseSize(string $size): float } } - private static function humanFilesize($bytes, $decimals = 2): string + private static function humanFilesize(float $bytes, $decimals = 2): string { $size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; $factor = floor((strlen($bytes) - 1) / 3);