From 91b0a84def0b9b31737f418bd0813d9d9eee15e6 Mon Sep 17 00:00:00 2001 From: Willem Leuverink Date: Fri, 3 May 2024 12:16:56 +0200 Subject: [PATCH 1/2] run fixers --- app/Models/Message.php | 5 +++-- resources/views/components/input/button.blade.php | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Models/Message.php b/app/Models/Message.php index 6102b01..39bbd9c 100644 --- a/app/Models/Message.php +++ b/app/Models/Message.php @@ -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(); diff --git a/resources/views/components/input/button.blade.php b/resources/views/components/input/button.blade.php index c47cd69..4248ad8 100644 --- a/resources/views/components/input/button.blade.php +++ b/resources/views/components/input/button.blade.php @@ -21,6 +21,4 @@ 'type' => $type, 'href' => $href, 'class' => "{$defaultClasses} {$levelClasses}", -]) }}> - {{ $slot }} - +]) }}>{{ $slot }} From 823a916058b1a3539e6b7f7d5829fee3a0109c56 Mon Sep 17 00:00:00 2001 From: Willem Leuverink Date: Fri, 3 May 2024 12:20:50 +0200 Subject: [PATCH 2/2] fix linter --- .../support/{title-spacer.php => title-spacer.blade.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/views/components/support/{title-spacer.php => title-spacer.blade.php} (100%) diff --git a/resources/views/components/support/title-spacer.php b/resources/views/components/support/title-spacer.blade.php similarity index 100% rename from resources/views/components/support/title-spacer.php rename to resources/views/components/support/title-spacer.blade.php