Add getName(), ping(), and probe() to ProviderInterface. Introduce ProbeTrait to classify HTTP/transport exceptions into typed error codes, ProviderStatus as the result value object, and ProviderStatusType / ProviderErrorCode as backing enums. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
259 B
PHP
14 lines
259 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Service;
|
|
|
|
enum ProviderErrorCode: string
|
|
{
|
|
case AuthFailed = 'auth_failed';
|
|
case UrlUnreachable = 'url_unreachable';
|
|
case UserNotFound = 'user_not_found';
|
|
case Unknown = 'unknown';
|
|
}
|