@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | public function boot() |
41 | 41 | { |
42 | 42 | $this->publishes([ |
43 | - __DIR__ . '/../config/translator.php' => config_path('translator.php'), |
|
44 | - __DIR__ . '/../config/translation.php' => config_path('translation.php'), |
|
43 | + __DIR__.'/../config/translator.php' => config_path('translator.php'), |
|
44 | + __DIR__.'/../config/translation.php' => config_path('translation.php'), |
|
45 | 45 | ]); |
46 | - $this->loadMigrationsFrom(__DIR__ . '/../database/migrations/'); |
|
46 | + $this->loadMigrationsFrom(__DIR__.'/../database/migrations/'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -53,15 +53,15 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function register() |
55 | 55 | { |
56 | - $this->mergeConfigFrom(__DIR__ . '/../config/translator.php', 'translator'); |
|
57 | - $this->mergeConfigFrom(__DIR__ . '/../config/translation.php', 'translation'); |
|
56 | + $this->mergeConfigFrom(__DIR__.'/../config/translator.php', 'translator'); |
|
57 | + $this->mergeConfigFrom(__DIR__.'/../config/translation.php', 'translation'); |
|
58 | 58 | |
59 | 59 | parent::register(); |
60 | 60 | |
61 | 61 | /** |
62 | 62 | * Provider Antigo |
63 | 63 | */ |
64 | - Blade::directive('t', function ($args) { |
|
64 | + Blade::directive('t', function($args) { |
|
65 | 65 | return "<?php echo App::make('translation')->translate{$args}; ?>"; |
66 | 66 | }); |
67 | 67 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->app->bind(ClientInterface::class, Client::class); |
79 | 79 | |
80 | 80 | // Bind translation to the IoC. |
81 | - $this->app->bind('translation', function (Application $app) { |
|
81 | + $this->app->bind('translation', function(Application $app) { |
|
82 | 82 | return new Translation($app); |
83 | 83 | }); |
84 | 84 | |
@@ -109,20 +109,20 @@ discard block |
||
109 | 109 | protected function registerLoader() |
110 | 110 | { |
111 | 111 | $app = $this->app; |
112 | - $this->app->singleton('translation.loader', function ($app) { |
|
112 | + $this->app->singleton('translation.loader', function($app) { |
|
113 | 113 | $defaultLocale = $app['config']->get('app.locale'); |
114 | 114 | $loader = null; |
115 | 115 | $source = $app['config']->get('translator.source'); |
116 | 116 | |
117 | 117 | switch ($source) { |
118 | 118 | case 'mixed': |
119 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
119 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
120 | 120 | $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader); |
121 | 121 | $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
122 | 122 | $loader = new MixedLoader($defaultLocale, $fileLoader, $databaseLoader); |
123 | 123 | break; |
124 | 124 | case 'mixed_db': |
125 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
125 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
126 | 126 | $fileLoader = new FileLoader($defaultLocale, $laravelFileLoader); |
127 | 127 | $databaseLoader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
128 | 128 | $loader = new MixedLoader($defaultLocale, $databaseLoader, $fileLoader); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $loader = new DatabaseLoader($defaultLocale, $app->make(TranslationRepository::class)); |
132 | 132 | break; |
133 | 133 | default:case 'files': |
134 | - $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath() . '/resources/lang'); |
|
134 | + $laravelFileLoader = new LaravelFileLoader($app['files'], $app->basePath().'/resources/lang'); |
|
135 | 135 | $loader = new FileLoader($defaultLocale, $laravelFileLoader); |
136 | 136 | break; |
137 | 137 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function registerCacheRepository() |
151 | 151 | { |
152 | - $this->app->singleton('translation.cache.repository', function ($app) { |
|
152 | + $this->app->singleton('translation.cache.repository', function($app) { |
|
153 | 153 | $cacheStore = $app['cache']->getStore(); |
154 | 154 | return CacheRepositoryFactory::make($cacheStore, $app['config']->get('translator.cache.suffix')); |
155 | 155 | }); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $defaultLocale = $app['config']->get('app.locale'); |
167 | 167 | $languageRepository = $app->make(LanguageRepository::class); |
168 | 168 | $translationRepository = $app->make(TranslationRepository::class); |
169 | - $translationsPath = $app->basePath() . '/resources/lang'; |
|
169 | + $translationsPath = $app->basePath().'/resources/lang'; |
|
170 | 170 | $command = new FileLoaderCommand($languageRepository, $translationRepository, $app['files'], $translationsPath, $defaultLocale); |
171 | 171 | |
172 | 172 | $this->app['command.translator:load'] = $command; |