refactor: move ByteConverter from Helpers to Services namespace

- Move ByteConverter class to App\Ship\Services
- Update all imports across Filament form blocks
- Update ByteConverterServiceProvider
- Add INTEGRATION_CREDENTIAL_PREFIX to CacheKeys enum
This commit is contained in:
F4ilji
2026-07-02 00:29:29 +05:00
parent 938578d217
commit 2997558a50
12 changed files with 13 additions and 12 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\Ship\Services;
class ByteConverter
{
public static function bytesToHuman($bytes)
{
$units = ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ', 'ПиБ'];
for ($i = 0; $bytes > 1024; $i++) {
$bytes /= 1024;
}
return round($bytes, 2) . ' ' . $units[$i];
}
}