Skip to content

Commit d255f6d

Browse files
committed
fix style
1 parent a862a75 commit d255f6d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/CacheUiLaravel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public function forgetKey(string $key, ?string $store = null): bool
4747
// Use the path from the specific store configuration, fallback to default
4848
$cachePath = config("cache.stores.{$storeName}.path", config('cache.stores.file.path', storage_path('framework/cache/data')));
4949

50-
$parts = array_slice(str_split($key, 2), 0, 2);
51-
$path = $cachePath . '/' . implode('/', $parts) . '/' . $key;
50+
$parts = array_slice(mb_str_split($key, 2), 0, 2);
51+
$path = $cachePath.'/'.implode('/', $parts).'/'.$key;
5252

5353
if (File::exists($path)) {
5454
return File::delete($path);

tests/Unit/CacheUiLaravelFileDriverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
// Expected file path reconstruction
3030
// 00/8c/008cb7ea48f292dd8b03d361a4c9f66085f77090
31-
$expectedPath = $cachePath . '/00/8c/' . $key;
31+
$expectedPath = $cachePath.'/00/8c/'.$key;
3232

3333
// Mock File existence and deletion
3434
File::shouldReceive('exists')->with($expectedPath)->andReturn(true);
@@ -51,7 +51,7 @@
5151
Config::set('cache.stores.file.path', $cachePath);
5252

5353
$key = '008cb7ea48f292dd8b03d361a4c9f66085f77090';
54-
$expectedPath = $cachePath . '/00/8c/' . $key;
54+
$expectedPath = $cachePath.'/00/8c/'.$key;
5555

5656
File::shouldReceive('exists')->with($expectedPath)->andReturn(true);
5757
File::shouldReceive('delete')->with($expectedPath)->andReturn(true);

0 commit comments

Comments
 (0)