<?php

namespace App\Commands;

use App\Services\Command;
use App\Services\Docker;
use Illuminate\Support\Facades\Process;

class Down extends Command
{
    protected $signature = 'down';

    protected $description = 'Stop the docker environment';

    public function handle() : void
    {

        $this->info('Stopping Wordpress');

        $downCommand = Docker::base('down');

        Process::run($downCommand, function (string $type, string $output) {
            echo $output;
        });
    }
}
