@@ -41,8 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * Create a new MultiLang instance. |
| 43 | 43 | * |
| 44 | - * @param string $environment |
|
| 45 | - * @param array $config |
|
| 44 | + * @param Config $config |
|
| 46 | 45 | * @param \Illuminate\Cache\CacheManager $cache |
| 47 | 46 | * @param \Illuminate\Database\DatabaseManager $db |
| 48 | 47 | */ |
@@ -57,7 +56,7 @@ discard block |
||
| 57 | 56 | * Get cache key name based on lang and scope |
| 58 | 57 | * |
| 59 | 58 | * @param $lang |
| 60 | - * @param null $scope |
|
| 59 | + * @param string|null $scope |
|
| 61 | 60 | * @return string |
| 62 | 61 | */ |
| 63 | 62 | public function getCacheName($lang, $scope = null) |
@@ -130,7 +129,7 @@ discard block |
||
| 130 | 129 | /** |
| 131 | 130 | * Check if we must load texts from cache |
| 132 | 131 | * |
| 133 | - * @param $lang |
|
| 132 | + * @param string $lang |
|
| 134 | 133 | * @param null $scope |
| 135 | 134 | * @return bool |
| 136 | 135 | */ |
@@ -171,7 +170,7 @@ discard block |
||
| 171 | 170 | * Save missing texts in database |
| 172 | 171 | * |
| 173 | 172 | * @param $texts |
| 174 | - * @param null $scope |
|
| 173 | + * @param string $scope |
|
| 175 | 174 | * @return bool |
| 176 | 175 | */ |
| 177 | 176 | public function save($texts, $scope = null) |
@@ -216,7 +215,7 @@ discard block |
||
| 216 | 215 | /** |
| 217 | 216 | * Get texts table name |
| 218 | 217 | * |
| 219 | - * @return array|mixed|null |
|
| 218 | + * @return string |
|
| 220 | 219 | */ |
| 221 | 220 | public function getTableName() |
| 222 | 221 | { |
@@ -35,9 +35,9 @@ |
||
| 35 | 35 | { |
| 36 | 36 | // Publish config files |
| 37 | 37 | $this->publishes([ |
| 38 | - __DIR__ . '/../config/config.php' => config_path('multilang.php'), |
|
| 39 | - __DIR__ . '/../views' => base_path('resources/views/vendor/multilang'), |
|
| 40 | - ]); |
|
| 38 | + __DIR__ . '/../config/config.php' => config_path('multilang.php'), |
|
| 39 | + __DIR__ . '/../views' => base_path('resources/views/vendor/multilang'), |
|
| 40 | + ]); |
|
| 41 | 41 | |
| 42 | 42 | // Append the country settings |
| 43 | 43 | $this->mergeConfigFrom( |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | // Register blade directives |
| 49 | - Blade::directive('t', function ($expression) { |
|
| 49 | + Blade::directive('t', function($expression) { |
|
| 50 | 50 | return "<?php echo e(t({$expression})); ?>"; |
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | - $this->app['events']->listen(RouteMatched::class, function () { |
|
| 53 | + $this->app['events']->listen(RouteMatched::class, function() { |
|
| 54 | 54 | $scope = $this->app['config']->get('app.scope'); |
| 55 | 55 | if ($scope && $scope != 'global') { |
| 56 | 56 | $this->app['multilang']->setScope($scope); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $configPath = __DIR__ . '/../config/config.php'; |
| 72 | 72 | $this->mergeConfigFrom($configPath, 'debugbar'); |
| 73 | 73 | |
| 74 | - $this->app->singleton('multilang', function ($app) { |
|
| 74 | + $this->app->singleton('multilang', function($app) { |
|
| 75 | 75 | $environment = $app->environment(); |
| 76 | 76 | $config = $app['config']->get('multilang'); |
| 77 | 77 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | 85 | if ($multilang->autoSaveIsAllowed()) { |
| 86 | - $app->terminating(function () use ($multilang) { |
|
| 86 | + $app->terminating(function() use ($multilang) { |
|
| 87 | 87 | $scope = $this->app['config']->get('app.scope'); |
| 88 | 88 | if ($scope && $scope != 'global') { |
| 89 | 89 | $multilang->setScope($scope); |
@@ -98,13 +98,13 @@ discard block |
||
| 98 | 98 | $this->app->alias('multilang', 'Longman\LaravelMultiLang\MultiLang'); |
| 99 | 99 | |
| 100 | 100 | $this->app['command.multilang.migration'] = $this->app->share( |
| 101 | - function () { |
|
| 101 | + function() { |
|
| 102 | 102 | return new MigrationCommand(); |
| 103 | 103 | } |
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | $this->app['command.multilang.texts'] = $this->app->share( |
| 107 | - function () { |
|
| 107 | + function() { |
|
| 108 | 108 | return new TextsCommand(); |
| 109 | 109 | } |
| 110 | 110 | ); |