Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
Fix bug for the command parameters
  • Loading branch information
JackieDo committed Jun 24, 2017
1 parent 7ec9ed8 commit 615e46d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Console/Commands/ArtisanPhpCsFixerFix.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public function __construct()
*/
public function fire()
{
chdir(base_path());

$phpCsFixerBinnaryPath = base_path('vendor/bin/php-cs-fixer');

$commandParams = [];

$commandParams[] = '--path-mode="'.$this->option('path-mode').'"';
Expand Down Expand Up @@ -93,6 +96,26 @@ public function fire()
$commandParams[] = '--show-progress="'.$this->option('show-progress').'"';
}

if ($this->option('quiet')) {
$commandParams[] = '--quiet';
}

if ($this->option('verbose')) {
$commandParams[] = '--verbose';
}

if ($this->option('ansi')) {
$commandParams[] = '--ansi';
}

if ($this->option('no-ansi')) {
$commandParams[] = '--no-ansi';
}

if ($this->option('no-interaction')) {
$commandParams[] = '--no-interaction';
}

if (!empty($this->argument('path'))) {
$paths = [];
foreach ($this->argument('path') as $path) {
Expand Down

0 comments on commit 615e46d

Please sign in to comment.