Skip to main content

HDInnovations/UNIT3D-Community-Edition

2255 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.