Skip to content

Commit

Permalink
Update Make command
Browse files Browse the repository at this point in the history
  • Loading branch information
nguereza-tony committed Nov 22, 2023
1 parent 2dd196c commit 7610c9c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/Console/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -435,6 +448,15 @@ public function __construct(
}
EOF;
}

/**
* Return the constructor content
* @return string
*/
protected function getMethodBodyContent(): string
{
return '';
}


/**
Expand Down

0 comments on commit 7610c9c

Please sign in to comment.