Lines 0.00% 0 / 5
Methods 0.00% 0 / 1
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 messageTemplate 0.00% 0 / 5 0.00% 0 / 1 30
9enum DeployError: string implements ExceptionReason
10{
11    case CommitIdInvalid = 'commit_id_invalid';
12    case CommandTimedOut = 'command_timed_out';
13    case CommandFailed = 'command_failed';
14    case PrepareOutputUnexpected = 'prepare_output_unexpected';
15
16    public function messageTemplate(): string
17    {
18        return match ($this) {
19            self::CommitIdInvalid => '"{value}" is not a commit hash.',
20            self::CommandTimedOut => '{command} did not finish within {timeout}.',
21            self::CommandFailed => '{command} failed with exit code {exitCode}: {detail}',
22            self::PrepareOutputUnexpected => 'release-prepare printed "{output}" instead of a commit and its state.',
23        };
24    }
25}