Skip to content

A self-hosted media server and file management system

chore: code smells

aminnausin3290cea8832f
diff --git a/app/Console/Commands/ResetDemo.php b/app/Console/Commands/ResetDemo.php
index e6ec4c24..d8a6e731 100644
--- a/app/Console/Commands/ResetDemo.php
+++ b/app/Console/Commands/ResetDemo.php
@@ -71,7 +71,7 @@ class ResetDemo extends Command {
}
}
- $this->ClearStructureFiles();
+ $this->clearStructureFiles();
Metadata::resetAllEditableFields();
Series::resetAllEditableFields();
@@ -97,7 +97,7 @@ class ResetDemo extends Command {
$this->info('✅ Demo DB reset complete.');
}
- private function ClearStructureFiles() {
+ private function clearStructureFiles() {
$disk = Storage::disk('local');
foreach ($this->structureFiles as $path) {
if ($disk->exists($path)) {
diff --git a/app/Traits/HasPeriod.php b/app/Traits/HasPeriod.php
index 09e03b27..5ff367dd 100644
--- a/app/Traits/HasPeriod.php
+++ b/app/Traits/HasPeriod.php
@@ -22,7 +22,7 @@ trait HasPeriod {
// Extract the value and unit from the period string
[$fullMatch, $value, $unit] = $matches;
- $result = match ($unit) {
+ return match ($unit) {
'hour', 'hours' => CarbonInterval::hours($value),
'day', 'days' => CarbonInterval::days($value),
'week', 'weeks' => CarbonInterval::weeks($value),
@@ -30,8 +30,6 @@ trait HasPeriod {
'year', 'years' => CarbonInterval::years($value),
default => CarbonInterval::hours(1),
};
-
- return $result;
}
/**
diff --git a/resources/js/components/dashboard/DashboardUsers.vue b/resources/js/components/dashboard/DashboardUsers.vue
index b468415d..0cbfa45f 100644
--- a/resources/js/components/dashboard/DashboardUsers.vue
+++ b/resources/js/components/dashboard/DashboardUsers.vue
@@ -2,9 +2,9 @@
import type { BreadCrumbItem } from '@/types/types';
import type { UserResource } from '@/types/resources';
-import { computed, onMounted, ref } from 'vue';
import { useDashboardStore } from '@/stores/DashboardStore';
import { useQueryClient } from '@tanstack/vue-query';
+import { computed, ref } from 'vue';
import { storeToRefs } from 'pinia';
import { deleteUser } from '@/service/siteAPI';
import { sortObject } from '@/service/sort/baseSort';
diff --git a/resources/js/service/video/frameService.test.ts b/resources/js/service/video/frameService.test.ts
index bb0c6f25..3869c1b5 100644
--- a/resources/js/service/video/frameService.test.ts
+++ b/resources/js/service/video/frameService.test.ts
@@ -1,4 +1,4 @@
-import { describe, it, vi, expect, beforeEach, afterEach } from 'vitest';
+import { describe, it, vi, expect, beforeEach } from 'vitest';
import { saveVideoFrame, copyVideoFrame } from './frameService';
import { toast } from '../toaster/toastService';