Skip to content

Commit 408302b

Browse files
committed
fixed typing
1 parent 15a8afe commit 408302b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Generator/ApiControllerMakeCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function makeRequestClass()
8383

8484
protected function confirmModelExists()
8585
{
86-
$modelClass = $this->parseModel($this->option('model'));
86+
$modelClass = $this->parseModel(/** @scrutinizer ignore-type */ $this->option('model'));
8787

8888
if (! class_exists($modelClass, false)) {
8989
if ($this->confirm("A {$modelClass} model does not exist!! Do you want to generate it?", true)) {
@@ -98,7 +98,7 @@ protected function confirmModelExists()
9898

9999
protected function confirmModelPolicyExists()
100100
{
101-
$modelClass = $this->parseModel($this->option('model'));
101+
$modelClass = $this->parseModel(/** @scrutinizer ignore-type */ $this->option('model'));
102102
$model = class_basename($modelClass);
103103
$policyClass = rtrim($modelClass, $model).'Policies\\'.$model.'Policy';
104104
if (! class_exists($policyClass)) {

src/Generator/ApiModelMakeCommand.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public function handle()
4848
*/
4949
protected function createMigration()
5050
{
51-
$table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));
51+
$table = Str::snake(Str::pluralStudly(class_basename(/** @scrutinizer ignore-type */ $this->argument('name'))));
5252

5353
$this->call('make:migration', [
54-
'name' => "create_{$table}_table",
54+
'name' => "create_{$table}_table",
5555
'--create' => $table,
5656
]);
5757
}
@@ -68,7 +68,7 @@ protected function createPolicy()
6868
$policy = rtrim($modelName, $name).'Policies\\'.$name;
6969

7070
$this->call('make:api:policy', [
71-
'name' => "{$policy}Policy",
71+
'name' => "{$policy}Policy",
7272
'--model' => $modelName,
7373
]);
7474
}
@@ -92,8 +92,8 @@ protected function getStub()
9292
protected function resolveStubPath($stub)
9393
{
9494
return file_exists($customPath = $this->laravel->basePath(trim($stub, '/')))
95-
? $customPath
96-
: __DIR__.$stub;
95+
? $customPath
96+
: __DIR__.$stub;
9797
}
9898

9999
protected function getOptions()

0 commit comments

Comments
 (0)