diff --git a/src/Console/MakeCommand.php b/src/Console/MakeCommand.php index 4027d93..ebd3684 100644 --- a/src/Console/MakeCommand.php +++ b/src/Console/MakeCommand.php @@ -277,8 +277,9 @@ protected function createClass(): string $replaceClasses = $this->replaceClasses($replaceUses); $replaceProperties = $this->replaceProperties($replaceClasses); $replaceConstructor = $this->replaceConstructor($replaceProperties); + $replaceMethodBody = $this->replaceMethodBody($replaceConstructor); - return $replaceConstructor; + return $replaceMethodBody; } /** @@ -346,6 +347,18 @@ protected function replaceConstructor(string $content): string return str_replace('%constructor%', $replaceContent, $content); } + + /** + * Replace the method body + * @param string $content + * @return string + */ + protected function replaceMethodBody(string $content): string + { + $replaceContent = $this->getMethodBodyContent(); + + return str_replace('%method_body%', $replaceContent, $content); + } /** * Replace the class uses instructions @@ -435,6 +448,15 @@ public function __construct( } EOF; } + + /** + * Return the constructor content + * @return string + */ + protected function getMethodBodyContent(): string + { + return ''; + } /**