Closes Module 1: 9 auth endpoints under /api/v1/auth, OTP via SMS (Semaphore + log + fake drivers), role middleware, role + admin seeders, 27 feature tests passing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
23 lines
495 B
PHP
23 lines
495 B
PHP
<?php
|
|
|
|
namespace App\Services\Sms;
|
|
|
|
class SmsResult
|
|
{
|
|
public function __construct(
|
|
public readonly bool $sent,
|
|
public readonly ?string $providerMessageId = null,
|
|
public readonly ?string $error = null,
|
|
) {}
|
|
|
|
public static function success(?string $providerMessageId = null): self
|
|
{
|
|
return new self(true, $providerMessageId);
|
|
}
|
|
|
|
public static function failure(string $error): self
|
|
{
|
|
return new self(false, null, $error);
|
|
}
|
|
}
|