diff --git a/templates/bake/Command/command.twig b/templates/bake/Command/command.twig index 7c376d59..d862366b 100644 --- a/templates/bake/Command/command.twig +++ b/templates/bake/Command/command.twig @@ -35,6 +35,16 @@ class {{ name }}Command extends Command */ protected string $name = '{{ command_name }}'; + /** + * Get the default command name. + * + * @return string + */ + public static function defaultName(): string + { + return '{{ command_name }}'; + } + /** * Get the command description. * diff --git a/tests/comparisons/Command/testBakePlugin.php b/tests/comparisons/Command/testBakePlugin.php index 6abb4d67..f3f0ea73 100644 --- a/tests/comparisons/Command/testBakePlugin.php +++ b/tests/comparisons/Command/testBakePlugin.php @@ -20,6 +20,16 @@ class ExampleCommand extends Command */ protected string $name = 'test_bake example'; + /** + * Get the default command name. + * + * @return string + */ + public static function defaultName(): string + { + return 'test_bake example'; + } + /** * Get the command description. *