Skip to content

Commit 323447a

Browse files
dermatzCopilot
andauthored
Update src/Service/VendorFileMapper.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ee34736 commit 323447a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/Service/VendorFileMapper.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ public function mapToThemePath(string $sourcePath, string $themePath): string
3434

3535
// Check if source starts with this module path
3636
if (str_starts_with($sourcePath, $path . '/')) {
37-
$pathInsideModule = substr($sourcePath, strlen($path) + 1);
37+
$pathInsideModule = substr($sourcePath, strlen($path) + 1);
3838

39-
// Remove view/frontend/ or view/base/ from the path
40-
$cleanPath = (string) preg_replace('#^view/(frontend|base)/#', '', $pathInsideModule);
39+
// Remove view/frontend/ or view/base/ from the path
40+
$cleanPath = (string) preg_replace(
41+
'#^view/(frontend|base)/#',
42+
'',
43+
$pathInsideModule
44+
);
4145

42-
return rtrim($themePath, '/') . '/' . $moduleName . '/' . ltrim($cleanPath, '/');
46+
return rtrim($themePath, '/') . '/' . $moduleName . '/' . ltrim($cleanPath, '/');
4347
}
4448
}
4549

0 commit comments

Comments
 (0)