20 lines
475 B
PHP
20 lines
475 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\ReasonTranslation\Contracts;
|
|
|
|
use App\Support\ReasonTranslation\ReasonResolutionEnvelope;
|
|
|
|
interface TranslatesReasonCode
|
|
{
|
|
public function artifactKey(): string;
|
|
|
|
public function canTranslate(string $reasonCode): bool;
|
|
|
|
/**
|
|
* @param array<string, mixed> $context
|
|
*/
|
|
public function translate(string $reasonCode, string $surface = 'detail', array $context = []): ?ReasonResolutionEnvelope;
|
|
}
|