Skip to content

Commit bce3382

Browse files
authored
Merge pull request #57 from kg-bot/analysis-ajQbmV
Apply fixes from StyleCI
2 parents 194e093 + d1e9824 commit bce3382

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

src/Classes/ExportLocalizations.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,14 @@ protected function parseJsonFiles($file, $key, $dir)
336336
}
337337
}
338338

339-
public static function exportToArray(){
340-
return (new ExportLocalizations)->export()->toArray();
339+
public static function exportToArray()
340+
{
341+
return (new self)->export()->toArray();
341342
}
342343

343344
protected static function executeCallback($strings)
344345
{
345-
if($callback = config('laravel-localization.export_callback')) {
346+
if ($callback = config('laravel-localization.export_callback')) {
346347
$strings = $callback($strings);
347348
}
348349

src/config/laravel-localization.php

+12-13
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
'routes' => [
1212

1313
/**
14-
* Route prefix, example of route http://localhost/js/localizations.js
15-
*
14+
* Route prefix, example of route http://localhost/js/localizations.js.
1615
*/
1716
'prefix' => env('LARAVEL_LOCALIZATION_PREFIX', '/js/localization.js'),
1817

1918
/**
20-
* Route name, defaults to assets.lang
19+
* Route name, defaults to assets.lang.
2120
*/
2221
'name' => env('LARAVEL_LOCALIZATION_ROUTE_NAME', 'assets.lang'),
2322

@@ -33,14 +32,14 @@
3332
: [],
3433

3534
/**
36-
* Should we enable public URL from which we can access translations
35+
* Should we enable public URL from which we can access translations.
3736
*/
3837
'enable' => env('LARAVEL_LOCALIZATION_ROUTE_ENABLE', false),
3938
],
4039
'events' => [
4140

4241
/**
43-
* This package emits some events after it getters all translation messages
42+
* This package emits some events after it getters all translation messages.
4443
*
4544
* Here you can change channel on which events will broadcast
4645
*/
@@ -49,40 +48,40 @@
4948
'caches' => [
5049

5150
/**
52-
* What cache driver do you want to use - more information: https://laravel.com/docs/5.6/cache#driver-prerequisites
51+
* What cache driver do you want to use - more information: https://laravel.com/docs/5.6/cache#driver-prerequisites.
5352
*/
5453
'driver' => 'file',
5554

5655
/**
57-
* Key name of the cache entry for the localization array
56+
* Key name of the cache entry for the localization array.
5857
*/
5958
'key' => 'localization.array',
6059

6160
/**
62-
* Timeout of the cached data in minutes - set to 0 to disable
61+
* Timeout of the cached data in minutes - set to 0 to disable.
6362
*/
6463
'timeout' => 60,
6564
],
6665
'js' => [
6766
/**
68-
* Default locale for export
67+
* Default locale for export.
6968
*/
7069
'default_locale' => 'en',
7170

7271
/**
73-
* root location to where JavaScript file will be exported
72+
* root location to where JavaScript file will be exported.
7473
*/
7574
'filepath' => resource_path('assets/js'),
7675

7776
/**
78-
* File name for JavaScript file with exported messages
77+
* File name for JavaScript file with exported messages.
7978
*/
8079
'filename' => 'll_messages.js',
8180
],
8281
'paths' => [
8382

8483
/**
85-
* You can export more lang files then just files in resources/lang, for example
84+
* You can export more lang files then just files in resources/lang, for example.
8685
*
8786
* In you .env file just add:
8887
* LARAVEL_LOCALIZATION_LANG_DIRS=resources/lang,Modules/Blog/Resources/lang
@@ -98,7 +97,7 @@
9897
],
9998
/**
10099
* This function will be called every time after export, it should be globally accessible function (eg. Laravel helper function)
101-
* and it should accept (string) argument
100+
* and it should accept (string) argument.
102101
*/
103102
'export_callback' => null,
104103

src/routes.php

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
* Date: 6/4/18
66
* Time: 12:18 AM.
77
*/
8-
use KgBot\LaravelLocalization\Facades\ExportLocalizations;
9-
108
if (config('laravel-localization.routes.enable')) {
119
/*
1210
* Localization

0 commit comments

Comments
 (0)