Skip to content

Commit c4b4303

Browse files
kg-botStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 51d14b2 commit c4b4303

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

src/Console/Commands/ExportMessagesToFlat.php

+13-16
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace KgBot\LaravelLocalization\Console\Commands;
44

55
use Illuminate\Console\Command;
6-
use KgBot\LaravelLocalization\Facades\ExportLocalizations;
7-
use League\Flysystem\Adapter\Local;
86
use League\Flysystem\Filesystem;
7+
use League\Flysystem\Adapter\Local;
8+
use KgBot\LaravelLocalization\Facades\ExportLocalizations;
99

1010
class ExportMessagesToFlat extends Command
1111
{
@@ -42,26 +42,23 @@ public function handle()
4242
{
4343
$messages = ExportLocalizations::export()->toFlat();
4444

45-
$filepath = config( 'laravel-localization.js.filepath', resource_path( 'assets/js' ) );
46-
$filename = config( 'laravel-localization.js.filename', 'll_messages.js' );
45+
$filepath = config('laravel-localization.js.filepath', resource_path('assets/js'));
46+
$filename = config('laravel-localization.js.filename', 'll_messages.js');
4747

48-
$adapter = new Local( $filepath );
49-
$filesystem = new Filesystem( $adapter );
48+
$adapter = new Local($filepath);
49+
$filesystem = new Filesystem($adapter);
5050

51-
$contents = 'export default ' . json_encode( $messages );
52-
53-
if ( $filesystem->has( $filename ) ) {
54-
55-
$filesystem->delete( $filename );
56-
$filesystem->write( $filename, $contents );
51+
$contents = 'export default '.json_encode($messages);
5752

53+
if ($filesystem->has($filename)) {
54+
$filesystem->delete($filename);
55+
$filesystem->write($filename, $contents);
5856
} else {
59-
60-
$filesystem->write( $filename, $contents );
57+
$filesystem->write($filename, $contents);
6158
}
6259

63-
$this->info( 'Messages exported to JavaScript file, you can find them at ' . $filepath . DIRECTORY_SEPARATOR
64-
. $filename );
60+
$this->info('Messages exported to JavaScript file, you can find them at '.$filepath.DIRECTORY_SEPARATOR
61+
.$filename);
6562

6663
return true;
6764
}

src/LaravelLocalizationServiceProvider.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@ class LaravelLocalizationServiceProvider extends ServiceProvider
1717
{
1818
public function boot()
1919
{
20-
$this->app->bind( 'export-localization', function () {
20+
$this->app->bind('export-localization', function () {
2121
return new ExportLocalizations();
22-
} );
22+
});
2323

2424
/*
2525
* Config
2626
*/
2727
$this->mergeConfigFrom(
28-
__DIR__ . '/config/laravel-localization.php', 'laravel-localization'
28+
__DIR__.'/config/laravel-localization.php', 'laravel-localization'
2929
);
3030

31-
$this->publishes( [
32-
__DIR__ . '/config/laravel-localization.php' => config_path( 'laravel-localization.php' ),
33-
], 'config' );
31+
$this->publishes([
32+
__DIR__.'/config/laravel-localization.php' => config_path('laravel-localization.php'),
33+
], 'config');
3434

3535
/*
3636
* Routes
3737
*/
38-
$this->loadRoutesFrom( __DIR__ . '/routes.php' );
38+
$this->loadRoutesFrom(__DIR__.'/routes.php');
3939

40-
if ( $this->app->runningInConsole() ) {
41-
$this->commands( [
40+
if ($this->app->runningInConsole()) {
41+
$this->commands([
4242
ExportMessages::class,
4343
ExportMessagesToFlat::class,
44-
] );
44+
]);
4545
}
4646
}
4747
}

0 commit comments

Comments
 (0)