| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function register() |
||
| 20 | { |
||
| 21 | $this->mergeConfigFrom(__DIR__.'/../config/generator.php', 'generator'); |
||
| 22 | |||
| 23 | $this->publishes([ |
||
| 24 | __DIR__.'/../config/generator.php' => config_path('generator.php'), |
||
| 25 | ], 'config'); |
||
| 26 | |||
| 27 | $this->publishes([ |
||
| 28 | __DIR__.'/../resources/stubs' => base_path('resources/stubs'), |
||
| 29 | ], 'stubs'); |
||
| 30 | |||
| 31 | $this->app->singleton(Generator::class, function ($app) { |
||
| 32 | return new Generator($app['config']['generator']); |
||
| 33 | }); |
||
| 34 | |||
| 35 | $this->app->singleton(CommandFactory::class, function ($app) { |
||
| 36 | return new CommandFactory($app['config']['generator'], $app[Generator::class], $app); |
||
| 37 | }); |
||
| 38 | |||
| 39 | $this->commands($this->app->make(CommandFactory::class)->create()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |