Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 24, 2023
1 parent 6f1522b commit 46e297f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Console/MiddlewareMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -48,6 +49,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -58,6 +60,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
1 change: 1 addition & 0 deletions src/Console/MigrateMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function __construct(MigrationCreator $creator, Composer $composer)
*
* @return void
*/
#[\Override]
public function handle()
{
$preset = $this->generatorPreset();
Expand Down
13 changes: 13 additions & 0 deletions src/Console/ModelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
}

/**
* Run after code successfully generated.
*/
protected function afterCodeHasBeenGenerated(): void
{
if ($this->option('all')) {
Expand Down Expand Up @@ -80,6 +84,7 @@ protected function afterCodeHasBeenGenerated(): void
*
* @return void
*/
#[\Override]
protected function createFactory()
{
$factory = Str::studly($this->getNameInput());
Expand All @@ -96,6 +101,7 @@ protected function createFactory()
*
* @return void
*/
#[\Override]
protected function createMigration()
{
$table = Str::snake(Str::pluralStudly(class_basename($this->getNameInput())));
Expand All @@ -117,6 +123,7 @@ protected function createMigration()
*
* @return void
*/
#[\Override]
protected function createSeeder()
{
$seeder = Str::studly(class_basename($this->getNameInput()));
Expand All @@ -132,6 +139,7 @@ protected function createSeeder()
*
* @return void
*/
#[\Override]
protected function createController()
{
$controller = Str::studly(class_basename($this->getNameInput()));
Expand All @@ -152,6 +160,7 @@ protected function createController()
*
* @return void
*/
#[\Override]
protected function createPolicy()
{
$policy = Str::studly(class_basename($this->getNameInput()));
Expand All @@ -169,6 +178,7 @@ protected function createPolicy()
* @param string $rootNamespace
* @return string
*/
#[\Override]
protected function getDefaultNamespace($rootNamespace)
{
return rtrim($this->generatorPreset()->modelNamespace(), '\\');
Expand All @@ -180,6 +190,7 @@ protected function getDefaultNamespace($rootNamespace)
* @param string $model
* @return string
*/
#[\Override]
protected function qualifyModel(string $model)
{
return $this->qualifyModelUsingCanvas($model);
Expand All @@ -191,6 +202,7 @@ protected function qualifyModel(string $model)
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -201,6 +213,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
3 changes: 3 additions & 0 deletions src/Console/NotificationMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -58,6 +59,7 @@ public function afterCodeHasBeenGenerated(string $className, string $path): void
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -68,6 +70,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down

0 comments on commit 46e297f

Please sign in to comment.