Skip to content

Commit

Permalink
Add php artisan pint:fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
relliv committed May 27, 2024
1 parent b27fa5b commit 12c20aa
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions app/Console/Commands/PintFixCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class PintFixCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'pint:fix';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Run `./vendor/bin/pint` over php artisan commands';

/**
* Execute the console command.
*/
public function handle()
{
if (config('app.env') === 'local') {
$this->info('Running `./vendor/bin/pint`...');

$output = shell_exec(base_path('vendor/bin/pint'));

return $this->info($output);
}
}
}

0 comments on commit 12c20aa

Please sign in to comment.