🚧 Work on command

This commit is contained in:
Dan Jones 2022-03-05 19:51:04 -06:00
commit b1f1f77b17
2 changed files with 51 additions and 10 deletions

25
app/Models/Input.php Normal file
View file

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use App\Exceptions\Quit;
class Input
{
public ?array $files;
public ?string $url;
public function assertValid(): void
{
throw_if(
empty($this->files) && empty($this->url),
Quit::class,
'Must have either a valid file or URL'
);
}
public function hasURL(): bool
{
return !empty($this->url);
}
}