Skip to content

Commit c43a8e5

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 510f328 commit c43a8e5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Foundation/Console/VendorPublishCommand.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ protected function status($from, $to, $type)
2121
$pathLocation = function ($path) use ($laravelPath, $packagePath) {
2222
$path = (string) realpath($path);
2323

24-
if (str_starts_with($path, $laravelPath)) {
25-
return str_replace("{$laravelPath}/", '@laravel/', $path);
26-
} elseif (str_starts_with($path, $packagePath)) {
27-
return str_replace("{$packagePath}/", './', $path);
28-
}
29-
30-
return $path;
24+
return match (true) {
25+
str_starts_with($path, $laravelPath) => str_replace("{$laravelPath}/", '@laravel/', $path),
26+
str_starts_with($path, $packagePath) => str_replace("{$packagePath}/", './', $path),
27+
default => $path,
28+
};
3129
};
3230

3331
$fromLocation = $pathLocation($from);

0 commit comments

Comments
 (0)