3 namespace App\Console\Commands;
6 use Illuminate\Console\Command;
8 class BeatDiffCommand extends Command
11 * The name and signature of the console command.
15 protected $signature = 'beat:diff {source} {target} {patch}';
18 * The console command description.
22 protected $description = 'Create BPS patch';
25 * Execute the console command.
29 public function handle()
31 $source = file_get_contents($this->argument('source'));
32 $target = file_get_contents($this->argument('target'));
33 $encoder = new Encoder($source);
34 $patch = $encoder->createPatch($target);
35 file_put_contents($this->argument('patch'), $patch);