Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone authored Oct 17, 2024
1 parent 7e6cf62 commit 3d2e02a
Showing 1 changed file with 9 additions and 48 deletions.
57 changes: 9 additions & 48 deletions src/Commands/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,104 +16,65 @@ abstract class GeneratorCommand extends \Illuminate\Console\GeneratorCommand imp
use Concerns\TestGenerator;
use Concerns\UsesGeneratorOverrides;

/**
* Create a new controller creator command instance.
*
* @return void
*/
/** {@inheritDoc} */
public function __construct(Filesystem $files)
{
parent::__construct($files);

$this->addGeneratorPresetOptions();
}

/**
* Execute the console command.
*
* @return bool|null
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
/** {@inheritDoc} */
#[\Override]
public function handle()
{
/** @phpstan-ignore return.type */
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
}

/**
* Get the destination class path.
*
* @param string $name
* @return string
*/
/** {@inheritDoc} */
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
}

/**
* Qualify the given model class base name.
*
* @return string
*/
/** {@inheritDoc} */
#[\Override]
protected function qualifyModel(string $model)
{
return $this->qualifyModelUsingCanvas($model);
}

/**
* Get the root namespace for the class.
*
* @return string
*/
/** {@inheritDoc} */
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
}

/**
* Get the model for the default guard's user provider.
*
* @return string|null
*/
/** {@inheritDoc} */
#[\Override]
protected function userProviderModel()
{
return $this->userProviderModelUsingCanvas();
}

/**
* Get the first view directory path from the application configuration.
*
* @return string
*/
/** {@inheritDoc} */
#[\Override]
protected function viewPath($path = '')
{
return $this->viewPathUsingCanvas($path);
}

/**
* Get a list of possible model names.
*
* @return array<int, string>
*/
/** {@inheritDoc} */
#[\Override]
protected function possibleModels()
{
return $this->possibleModelsUsingCanvas();
}

/**
* Get a list of possible event names.
*
* @return array<int, string>
*/
/** {@inheritDoc} */
#[\Override]
protected function possibleEvents()
{
Expand Down

0 comments on commit 3d2e02a

Please sign in to comment.