Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 1 |
1 | <?php declare(strict_types=1); |
||
5 | class CustomerState |
||
6 | { |
||
7 | public const BLOCKED = 'blocked'; |
||
8 | |||
9 | public const DELETED = 'deleted'; |
||
10 | |||
11 | public const NEW = 'new'; |
||
12 | |||
13 | public const OK = 'ok'; |
||
14 | |||
15 | private function __construct(protected string $state = self::NEW) |
||
16 | { |
||
17 | } |
||
18 | |||
19 | public function getName(): string |
||
22 | } |
||
23 | |||
24 | public static function isDeleted(CustomerInterface $customer): bool |
||
27 | } |
||
28 | |||
29 | public static function deleted(): CustomerState |
||
32 | } |
||
33 | |||
34 | public static function fromString(string $name): self |
||
49 | } |
||
50 | } |
||
51 |