Skip to content

Commit

Permalink
refactor: #4 merge fix to code command
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunthegeek committed Oct 31, 2021
1 parent 11f3b22 commit aec612f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 47 deletions.
4 changes: 3 additions & 1 deletion src/LintCodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class LintCodeCommand extends Command
*/
protected $signature = 'lint:code
{files*}
{--fix : automatic fix}
{--standard=phpcs.xml : coding standards}';

/**
Expand All @@ -31,8 +32,9 @@ class LintCodeCommand extends Command
*/
public function handle()
{
$bin = $this->option('fix') ? 'phpcbf' : 'phpcs';
exec(
'vendor/bin/phpcs --standard=' . $this->option('standard')
"vendor/bin/$bin --standard=" . $this->option('standard')
. ' ' . implode(' ', $this->argument('files')),
$output,
$code
Expand Down
45 changes: 0 additions & 45 deletions src/LintFixCommand.php

This file was deleted.

1 change: 0 additions & 1 deletion src/LintServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public function boot()
if ($this->app->runningInConsole()) {
$this->commands([
LintCodeCommand::class,
LintFixCommand::class,
LintPublishCommand::class,
LintRouteCommand::class,
LintStagedCommand::class,
Expand Down

0 comments on commit aec612f

Please sign in to comment.