Upload beautify
This commit is contained in:
24
app/DTOs/Uploads/UploadScanResult.php
Normal file
24
app/DTOs/Uploads/UploadScanResult.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\DTOs\Uploads;
|
||||
|
||||
final class UploadScanResult
|
||||
{
|
||||
public function __construct(
|
||||
public readonly bool $ok,
|
||||
public readonly string $reason
|
||||
) {
|
||||
}
|
||||
|
||||
public static function clean(): self
|
||||
{
|
||||
return new self(true, '');
|
||||
}
|
||||
|
||||
public static function infected(string $reason): self
|
||||
{
|
||||
return new self(false, $reason);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user