| Total Complexity | 7 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PartnerStatus |
||
| 10 | { |
||
| 11 | public const ACTIVE = 'ACTIVE'; |
||
| 12 | public const INACTIVE = 'INACTIVE'; |
||
| 13 | |||
| 14 | public const VALUES = [ |
||
| 15 | self::ACTIVE, |
||
| 16 | self::INACTIVE |
||
| 17 | ]; |
||
| 18 | |||
| 19 | private string $value; |
||
| 20 | |||
| 21 | public function __construct(string $value) |
||
| 22 | { |
||
| 23 | self::inArray($value); |
||
| 24 | |||
| 25 | $this->value = $value; |
||
| 26 | } |
||
| 27 | |||
| 28 | public static function inArray(string $value): void |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getValue(): string |
||
| 36 | } |
||
| 37 | |||
| 38 | public function isActive(): bool |
||
| 39 | { |
||
| 40 | return $this->value === self::ACTIVE; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function isInactive(): bool |
||
| 44 | { |
||
| 45 | return $this->value === self::INACTIVE; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function __toString(): string |
||
| 49 | { |
||
| 50 | return $this->value; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string[] |
||
| 55 | */ |
||
| 56 | public static function getStatusChoices(): array |
||
| 61 | ]; |
||
| 62 | } |
||
| 63 | } |
||
| 64 |