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 May 31, 2024
1 parent d019810 commit 81eb8ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
14 changes: 4 additions & 10 deletions src/Console/ControllerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,8 @@ protected function qualifyModel(string $model)
#[\Override]
protected function buildParentReplacements()
{
/**
* @phpstan-ignore argument.type
*
* @var class-string|string $parentModelClass
*/
/** @var class-string|string $parentModelClass */
/** @phpstan-ignore argument.type */
$parentModelClass = $this->parseModel($this->option('parent'));

if (! class_exists($parentModelClass) &&
Expand Down Expand Up @@ -98,11 +95,8 @@ protected function buildParentReplacements()
#[\Override]
protected function buildModelReplacements(array $replace)
{
/**
* @phpstan-ignore argument.type
*
* @var class-string|string $modelClass
*/
/** @var class-string|string $modelClass */
/** @phpstan-ignore argument.type */
$modelClass = $this->parseModel($this->option('model'));

if (! class_exists($modelClass) && $this->components->confirm("A {$modelClass} model does not exist. Do you want to generate it?", true)) {
Expand Down
7 changes: 2 additions & 5 deletions src/Console/PresetMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ protected function getPath($name)
#[\Override]
protected function rootNamespace(): string
{
/**
* @phpstan-ignore argument.type
*
* @var string $namespace
*/
/** @var string $namespace */
/** @phpstan-ignore argument.type */
$namespace = transform($this->option('namespace'), function (string $namespace) {
return trim($namespace);
});
Expand Down
9 changes: 3 additions & 6 deletions src/Console/ViewMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ protected function resolveDefaultStubPath($stub)
#[\Override]
protected function getPath($name)
{
/**
* @phpstan-ignore argument.type
*
* @var string $extension
*/
/** @var string $extension */
/** @phpstan-ignore argument.type */
$extension = transform($this->option('extension'), fn (string $extension) => trim($extension));

return $this->viewPath(
Expand Down Expand Up @@ -118,7 +115,7 @@ protected function viewPath($path = '')
#[\Override]
protected function getNameInput()
{
/** @phpstan-ignore argument.type return.type */
/** @phpstan-ignore argument.type, return.type */
return transform($this->argument('name'), function (string $name) {
return str_replace(['\\', '.'], '/', trim($name));
});
Expand Down

0 comments on commit 81eb8ba

Please sign in to comment.