Skip to content

Commit b6a3d42

Browse files
authored
Merge pull request #13 from kg-bot/analysis-8LO56m
Apply fixes from StyleCI
2 parents 40e1519 + f24c11a commit b6a3d42

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/Console/Commands/ExportMessages.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 ExportMessages extends Command
1111
{
@@ -42,26 +42,23 @@ public function handle()
4242
{
4343
$messages = ExportLocalizations::export()->toArray();
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
}

0 commit comments

Comments
 (0)