success; } /** * Check if the export operation failed. */ public function isFailed(): bool { return ! $this->success; } /** * Create a successful result. */ public static function success(string $path, int $size): self { return new self( success: true, path: $path, size: $size, ); } /** * Create a failed result. */ public static function failed(string $error): self { return new self( success: false, error: $error, ); } }