| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 30 | public function handle() |
||
| 31 | { |
||
| 32 | $class = $this->option('class'); |
||
| 33 | |||
| 34 | if (! class_exists($class)) { |
||
| 35 | throw new Exception('Invalid refactor class: '.$class); |
||
| 36 | } |
||
| 37 | |||
| 38 | if (! (new ReflectionClass($class))->hasMethod('run')) { |
||
| 39 | throw new Exception('Method run does not exist on: '.$class); |
||
| 40 | } |
||
| 41 | |||
| 42 | (new $class)->run(); |
||
| 43 | } |
||
| 45 |