Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function __invoke($type, $classname = null) |
||
18 | { |
||
19 | $generator = __NAMESPACE__ . '\\Generate\\' . ucfirst($type); |
||
20 | if (! class_exists($generator)) { |
||
21 | $this->stdio->errln( |
||
22 | '<<red>>No such generator class: ' . $generator . '<<reset>>' |
||
23 | ); |
||
24 | return Status::FAILURE; |
||
25 | } |
||
26 | |||
27 | $command = new $generator($this->context, $this->stdio, $this->ci); |
||
28 | return $command($type, $classname); |
||
29 | } |
||
30 | } |
||
31 |