| Total Complexity | 7 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | class TranslatorServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Bootstrap the application services. |
||
| 12 | * |
||
| 13 | * @return void |
||
| 14 | */ |
||
| 15 | public function boot() |
||
| 16 | { |
||
| 17 | if ($this->app->runningInConsole()) { |
||
|
|
|||
| 18 | $this->publishConfigs(); |
||
| 19 | $this->publishMigrations(); |
||
| 20 | } |
||
| 21 | |||
| 22 | $this->mergeConfigFrom(__DIR__.'/../config/translator.php', 'translator'); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Register the service provider. |
||
| 27 | * |
||
| 28 | * @return void |
||
| 29 | */ |
||
| 30 | public function register() |
||
| 31 | { |
||
| 32 | $this->app->singleton(TranslatorContract::class, function ($app) { |
||
| 33 | return new Translator($app['config']); |
||
| 34 | }); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the services provided by the provider. |
||
| 39 | * |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | public function provides() |
||
| 45 | } |
||
| 46 | |||
| 47 | protected function publishConfigs(): void |
||
| 52 | } |
||
| 53 | |||
| 54 | protected function publishMigrations(): void |
||
| 65 | } |
||
| 66 | } |
||
| 67 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.