Files
Verde-Web/app/Services/Push/PushResult.php

23 lines
467 B
PHP

<?php
namespace App\Services\Push;
class PushResult
{
public function __construct(
public readonly bool $sent,
public readonly ?string $providerMessageId = null,
public readonly ?string $error = null,
) {}
public static function success(?string $id = null): self
{
return new self(true, $id);
}
public static function failure(string $error): self
{
return new self(false, null, $error);
}
}