From 8a54f09dae975ba46607f028f4afb45f5acee26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 3 Nov 2026 15:49:02 +0100 Subject: [PATCH] style(PathGenerators): format code for consistency --- src/Lib/PathGenerators/DateHashPathGenerator.php | 8 ++++---- src/Lib/PathGenerators/UuidPathGenerator.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Lib/PathGenerators/DateHashPathGenerator.php b/src/Lib/PathGenerators/DateHashPathGenerator.php index 5cc6ad2..e242cce 100644 --- a/src/Lib/PathGenerators/DateHashPathGenerator.php +++ b/src/Lib/PathGenerators/DateHashPathGenerator.php @@ -16,17 +16,17 @@ class DateHashPathGenerator implements PathGenerator public function generate(DiskName $disk, SanitizedFile $file, ?string $directory = null): StorageFilePath { $extension = pathinfo($file->sanitizedName, PATHINFO_EXTENSION); - $filename = pathinfo($file->sanitizedName, PATHINFO_FILENAME); + $filename = pathinfo($file->sanitizedName, PATHINFO_FILENAME); $sluggedName = Str::slug($filename) ?: 'file'; - $hashPrefix = substr(hash('sha256', $file->sanitizedName), 0, 2); - $uniquePart = substr(bin2hex(random_bytes(4)), 0, 8); + $hashPrefix = substr(hash('sha256', $file->sanitizedName), 0, 2); + $uniquePart = substr(bin2hex(random_bytes(4)), 0, 8); $finalFilename = sprintf( '%s-%s%s', $sluggedName, $uniquePart, - ! empty($extension) ? '.'.$extension : '' + ! empty($extension) ? '.' . $extension : '' ); $pathSegments = array_filter([ diff --git a/src/Lib/PathGenerators/UuidPathGenerator.php b/src/Lib/PathGenerators/UuidPathGenerator.php index 8eba684..84ec14b 100644 --- a/src/Lib/PathGenerators/UuidPathGenerator.php +++ b/src/Lib/PathGenerators/UuidPathGenerator.php @@ -16,9 +16,9 @@ class UuidPathGenerator implements PathGenerator public function generate(DiskName $disk, SanitizedFile $file, ?string $directory = null): StorageFilePath { $extension = pathinfo($file->sanitizedName, PATHINFO_EXTENSION); - $uuid = Str::uuid()->toString(); + $uuid = Str::uuid()->toString(); - $finalFilename = $uuid.(! empty($extension) ? '.'.$extension : ''); + $finalFilename = $uuid . (! empty($extension) ? '.' . $extension : ''); $pathSegments = array_filter([ $directory ? trim($directory, '/') : null,