Files
newznab-tmux/app/Support/Data/ImageProcessingResult.php
2026-07-16 15:57:20 +02:00

28 lines
660 B
PHP

<?php
declare(strict_types=1);
namespace App\Support\Data;
final readonly class ImageProcessingResult
{
private function __construct(
public bool $success,
public ?string $path,
public ?int $width,
public ?int $height,
public ?string $mimeType,
public ?string $failureReason,
) {}
public static function success(string $path, int $width, int $height, string $mimeType): self
{
return new self(true, $path, $width, $height, $mimeType, null);
}
public static function failure(string $reason): self
{
return new self(false, null, null, null, null, $reason);
}
}