Lines 0.00% 0 / 4
Functions and Methods 0.00% 0 / 1
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
ReloadRequestOutcome 0.00% 0 / 4 0.00% 0 / 1 20 0.00% 0 / 1
 describeOutcome 0.00% 0 / 4 0.00% 0 / 1 20
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Runtime\Broker\Reload;
6
7enum ReloadRequestOutcome
8{
9    case Started;
10    case AlreadyUnderway;
11    case NotAccepting;
12
13    public function describeOutcome(): string
14    {
15        return match ($this) {
16            self::Started => 'Reload started; stewart status shows how it went.',
17            self::AlreadyUnderway => 'A reload is already underway.',
18            self::NotAccepting => 'Stewart is not running its apps yet, so there is nothing to reload.',
19        };
20    }
21}