| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 24 | public function register() |
|
| 35 | { |
||
| 36 | // Automatically apply the package configuration |
||
| 37 | 24 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'auto-translate'); |
|
| 38 | |||
| 39 | 24 | $this->app->bind(TranslatorInterface::class, config('auto-translate.translator')); |
|
| 40 | |||
| 41 | // Register the main class to use with the facade |
||
| 42 | $this->app->singleton('auto-translate', function () { |
||
| 43 | 24 | config([ |
|
| 44 | 24 | 'langman.path' => config('auto-translate.path'), |
|
| 45 | ]); |
||
| 46 | |||
| 47 | 24 | return new AutoTranslate(app(Manager::class), app(TranslatorInterface::class)); |
|
| 48 | 24 | }); |
|
| 49 | 24 | } |
|
| 50 | } |
||
| 51 |