Skip to content

Commit

Permalink
Merge pull request #2 from gwleuverink/workflows
Browse files Browse the repository at this point in the history
run fixers
  • Loading branch information
gwleuverink authored May 3, 2024
2 parents 15d22db + 823a916 commit 2dd09e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/Models/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ public function size(): Attribute
{
// NOTE: Number::fileSize doesn't work since NativePHP is missing the 'intl' extension
return Attribute::make(
get: function() {
get: function () {
$base = log(strlen($this->content)) / log(1024);
$suffix = array("", "KB", "MB", "GB", "TB");
$suffix = ['', 'KB', 'MB', 'GB', 'TB'];
$floor = floor($base);

return round(pow(1024, $base - $floor), 1) . $suffix[$floor];
}
)->shouldCache();
Expand Down
4 changes: 1 addition & 3 deletions resources/views/components/input/button.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@
'type' => $type,
'href' => $href,
'class' => "{$defaultClasses} {$levelClasses}",
]) }}>
{{ $slot }}
</{{ $element }}>
]) }}>{{ $slot }}</{{ $element }}>

0 comments on commit 2dd09e7

Please sign in to comment.