TranslationServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerLoader() 0 6 1
1
<?php
2
3
namespace mindtwo\LaravelMultilingual\Providers;
4
5
use Illuminate\Translation\TranslationServiceProvider as IlluminateTranslationServiceProvider;
6
7
class TranslationServiceProvider extends IlluminateTranslationServiceProvider
8
{
9
    /**
10
     * Register the translation line loader. This method registers a
11
     * `TranslationLoaderManager` instead of a simple `FileLoader` as the
12
     * applications `translation.loader` instance.
13
     */
14
    protected function registerLoader()
15
    {
16
        $this->app->singleton('translation.loader', function ($app) {
17
            $class = $this->app['config']->get('laravel-multilingual.translation_manager');
18
19
            return new $class($app['files'], $app['path.lang']);
20
        });
21
    }
22
}
23