Skip to content

Commit

Permalink
Merge pull request #44 from zingimmick/analysis-Rv0dWM
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
zingimmick authored Jun 14, 2020
2 parents d51f9f0 + 7b566fc commit 58fee62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions src/Commands/SmsSwitchConnectionCommand.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace Zing\LaravelSms\Commands;


use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputArgument;
Expand All @@ -17,6 +15,7 @@ class SmsSwitchConnectionCommand extends Command
* @var string
*/
protected $name = 'sms:connection';

/**
* Get the console command arguments.
*
Expand All @@ -25,9 +24,10 @@ class SmsSwitchConnectionCommand extends Command
protected function getArguments()
{
return [
new InputArgument('connection', InputArgument::REQUIRED, 'Which connection to use')
new InputArgument('connection', InputArgument::REQUIRED, 'Which connection to use'),
];
}

/**
* Get the console command options.
*
Expand All @@ -36,13 +36,12 @@ protected function getArguments()
protected function getOptions()
{
return [
new InputOption('show', 's', InputOption::VALUE_NONE,'Display the sms default connection instead of modifying files'),
new InputOption('show', 's', InputOption::VALUE_NONE, 'Display the sms default connection instead of modifying files'),
new InputOption('always-no', null, InputOption::VALUE_NONE, 'Skip generating sms default connection if it already exists'),
new InputOption('force', 'f', InputOption::VALUE_NONE, 'Skip confirmation when overwriting an existing sms default connection'),
];
}


/**
* The console command description.
*
Expand All @@ -60,7 +59,7 @@ public function handle()
$connection = $this->argument('connection');

if ($this->option('show')) {
$this->comment('SMS_CONNECTION='.$connection);
$this->comment('SMS_CONNECTION=' . $connection);

return;
}
Expand Down Expand Up @@ -134,4 +133,4 @@ protected function envPath()

return $this->laravel->basePath('.env');
}
}
}
4 changes: 2 additions & 2 deletions src/SmsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function (Container $app) {
}
);
$this->app->alias('sms', Sms::class);
$this->app->singleton('command.sms.gateway',SmsSwitchConnectionCommand::class);
$this->app->singleton('command.sms.gateway', SmsSwitchConnectionCommand::class);
$this->commands([
'command.sms.gateway'
'command.sms.gateway',
]);
}
}

0 comments on commit 58fee62

Please sign in to comment.