Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

HDInnovations/UNIT3D-Community-Edition

2239 stars
2 code files
View HDInnovations/UNIT3D-Community-Edition on GitHub

app/Interfaces/ByteUnitsInterface.php

Open in GitHub
interface ByteUnitsInterface
{
public function bytesFromUnit(string $units): int;
}

app/Helpers/ByteUnits.php

Open in GitHub
use App\Interfaces\ByteUnitsInterface;
use ByteUnits as ByteUnitsLibrary;
 
class ByteUnits implements ByteUnitsInterface
{
public function bytesFromUnit(string $units): int
{
return ByteUnitsLibrary\parse($units)->numberOfBytes();
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.