Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysLees committed Jan 12, 2024
1 parent e3f9d3b commit 76bfbac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 40 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"CodebarAg\\LaravelDefault\\LaravelDefaultServiceProvider"
],
"aliases": {
"HelperCache": "CodebarAg\\LaravelDefault\\Facades\\HelperCache",
"HelperDate": "CodebarAg\\LaravelDefault\\Facades\\HelperDate",
"HelperIcon": "CodebarAg\\LaravelDefault\\Facades\\HelperIcon",
"HelperMoney": "CodebarAg\\LaravelDefault\\Facades\\HelperMoney",
Expand Down
18 changes: 0 additions & 18 deletions src/Facades/HelperCache.php

This file was deleted.

17 changes: 0 additions & 17 deletions src/Helpers/HelperCache.php

This file was deleted.

7 changes: 3 additions & 4 deletions src/Helpers/HelperFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

namespace CodebarAg\LaravelDefault\Helpers;

use Illuminate\Support\Number;

class HelperFile
{
public function formatBytes(int $size, int $precision = 1): string
{
$base = log($size, 1024);
$suffixes = ['B', 'KB', 'MB', 'GB', 'TB'];

return round(pow(1024, $base - floor($base)), $precision).' '.$suffixes[floor($base)];
return Number::fileSize($size, $precision);
}

public function nameWithDate(string $name): string
Expand Down

0 comments on commit 76bfbac

Please sign in to comment.