From 95a11ee4abf32c85c40daaefad1e3dcc1362b52a Mon Sep 17 00:00:00 2001 From: Ryan Chandler Date: Thu, 11 Jan 2024 00:12:46 +0000 Subject: [PATCH] Generate: Check for `Theme` suffix on class --- configure.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.php b/configure.php index 2fe336e..26104fb 100644 --- a/configure.php +++ b/configure.php @@ -138,7 +138,7 @@ match (true) { str_contains($file, determineSeparator('src/Skeleton.php')) => rename($file, determineSeparator('./src/' . $className . '.php')), str_contains($file, determineSeparator('src/SkeletonServiceProvider.php')) => rename($file, determineSeparator('./src/' . $className . 'ServiceProvider.php')), - str_contains($file, determineSeparator('src/SkeletonTheme.php')) => rename($file, determineSeparator('./src/' . $className . 'Theme.php')), + str_contains($file, determineSeparator('src/SkeletonTheme.php')) => rename($file, determineSeparator('./src/' . $className . (str_ends_with($className, 'Theme') ? '.php' : 'Theme.php'))), str_contains($file, determineSeparator('src/SkeletonPlugin.php')) => rename($file, determineSeparator('./src/' . $className . 'Plugin.php')), str_contains($file, determineSeparator('src/Facades/Skeleton.php')) => rename($file, determineSeparator('./src/Facades/' . $className . '.php')), str_contains($file, determineSeparator('src/Commands/SkeletonCommand.php')) => rename($file, determineSeparator('./src/Commands/' . $className . 'Command.php')),