Conditions | 4 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function proceed() |
||
34 | { |
||
35 | $modules = collect($this->argument('module'))->unique(); |
||
36 | $modules = $this->verifyActive($modules); |
||
37 | if ($modules === false || $modules->isEmpty()) { |
||
38 | return; |
||
39 | } |
||
40 | |||
41 | $options = $this->getOptions(); |
||
42 | |||
43 | $modules->each(function ($module) use ($options) { |
||
44 | /* @var Module $module */ |
||
45 | $class = $module->seederClass($this->option('class')); |
||
|
|||
46 | |||
47 | $result = $this->call('db:seed', |
||
48 | array_merge($options, ['--class' => $class])); |
||
49 | |||
50 | if ($result != 0) { |
||
51 | $this->error("[Module {$module->name()}] There was a problem with running seeder {$class}"); |
||
52 | |||
53 | return; |
||
54 | } |
||
55 | $this->info("[Module {$module->name()}] Seeded: {$class}"); |
||
56 | }); |
||
57 | } |
||
58 | } |
||
59 |
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.