| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 40% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class VisitorRole implements \Stringable |
||
| 8 | { |
||
| 9 | private const ROLE_TRADER = 'trader'; |
||
| 10 | private const ROLE_TEACHER = 'teacher'; |
||
| 11 | private const ROLE_QUEST_GIVER = 'quest giver'; |
||
| 12 | |||
| 13 | 1 | private function __construct( |
|
| 14 | private string $role, |
||
| 15 | 1 | ) {} |
|
| 16 | |||
| 17 | public static function trader(): self |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function teacher(): self |
||
| 25 | } |
||
| 26 | |||
| 27 | 1 | public static function questGiver(): self |
|
| 28 | { |
||
| 29 | 1 | return new self(self::ROLE_QUEST_GIVER); |
|
| 30 | } |
||
| 31 | |||
| 32 | public function __toString(): string |
||
| 35 | } |
||
| 36 | } |
||
| 37 |