Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function generate() |
||
36 | { |
||
37 | $generator = $this->config->get(EnumConfig::$GENERATOR); |
||
38 | $command = $this->config->get(EnumConfig::$COMMAND) ?: 'index'; |
||
39 | |||
40 | try { |
||
41 | $controllerClass = 'controllers\\' . $generator; |
||
42 | $refl = new ReflectionClass($controllerClass); |
||
43 | $controller = $refl->newInstanceArgs([ |
||
44 | $this->config, |
||
45 | $this->terminal, |
||
46 | $this->filesystem |
||
47 | ]); |
||
48 | } catch (\Exception $error) { |
||
|
|||
49 | } |
||
50 | |||
51 | $controller->{$command}(); |
||
52 | |||
53 | return $this; |
||
54 | } |
||
56 |