From f24c11a34507c922e573e03f138bf76896225b82 Mon Sep 17 00:00:00 2001 From: Stefan Ninic Date: Wed, 25 Jul 2018 22:07:50 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Console/Commands/ExportMessages.php | 29 +++++++++++-------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/Console/Commands/ExportMessages.php b/src/Console/Commands/ExportMessages.php index 6d2763e..712e3f3 100644 --- a/src/Console/Commands/ExportMessages.php +++ b/src/Console/Commands/ExportMessages.php @@ -3,9 +3,9 @@ namespace KgBot\LaravelLocalization\Console\Commands; use Illuminate\Console\Command; -use KgBot\LaravelLocalization\Facades\ExportLocalizations; -use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; +use League\Flysystem\Adapter\Local; +use KgBot\LaravelLocalization\Facades\ExportLocalizations; class ExportMessages extends Command { @@ -42,26 +42,23 @@ public function handle() { $messages = ExportLocalizations::export()->toArray(); - $filepath = config( 'laravel-localization.js.filepath', resource_path( 'assets/js' ) ); - $filename = config( 'laravel-localization.js.filename', 'll_messages.js' ); + $filepath = config('laravel-localization.js.filepath', resource_path('assets/js')); + $filename = config('laravel-localization.js.filename', 'll_messages.js'); - $adapter = new Local( $filepath ); - $filesystem = new Filesystem( $adapter ); + $adapter = new Local($filepath); + $filesystem = new Filesystem($adapter); - $contents = 'export default ' . json_encode( $messages ); - - if ( $filesystem->has( $filename ) ) { - - $filesystem->delete( $filename ); - $filesystem->write( $filename, $contents ); + $contents = 'export default '.json_encode($messages); + if ($filesystem->has($filename)) { + $filesystem->delete($filename); + $filesystem->write($filename, $contents); } else { - - $filesystem->write( $filename, $contents ); + $filesystem->write($filename, $contents); } - $this->info( 'Messages exported to JavaScript file, you can find them at ' . $filepath . DIRECTORY_SEPARATOR - . $filename ); + $this->info('Messages exported to JavaScript file, you can find them at '.$filepath.DIRECTORY_SEPARATOR + .$filename); return true; }