Lines 0.00% 0 / 2
Functions and Methods 0.00% 0 / 1
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
CommandError 0.00% 0 / 2 0.00% 0 / 1 6 0.00% 0 / 1
 messageTemplate 0.00% 0 / 2 0.00% 0 / 1 6
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Exception;
6
7enum CommandError: string implements ExceptionReason
8{
9    case Rejected = 'command_rejected';
10
11    public function messageTemplate(): string
12    {
13        return match ($this) {
14            self::Rejected => '{reason}',
15        };
16    }
17}