MakeSeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 8 1
1
<?php
2
3
namespace Yarak\Commands;
4
5
use Yarak\Console\YarakCommand;
6
use Yarak\DB\Seeders\SeederCreator;
7
8
class MakeSeeder extends YarakCommand
9
{
10
    /**
11
     * The command signature.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'make:seeder
16
                            {name : The name of your seeder file.}';
17
18
    /**
19
     * The command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create a new seeder file.';
24
25
    /**
26
     * Handle the command.
27
     */
28
    protected function handle()
29
    {
30
        $creator = new SeederCreator(
31
            $this->getOutput()
32
        );
33
34
        $creator->create($this->argument('name'));
0 ignored issues
show
Bug introduced by
It seems like $this->argument('name') targeting Artisanize\Command::argument() can also be of type array; however, Yarak\DB\Seeders\SeederCreator::create() does only seem to accept string, maybe add an additional type check?

This check looks at variables that are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
35
    }
36
}
37