79268132

Date: 2024-12-10 11:55:53
Score: 2
Natty:
Report link
enum Status
{
    case PAID;
    case Cancelled;

    public static function get(): array
    {
        return [
            self::PAID->value,
            self::Cancelled->value
        ]
    }

Status::get();

The enum case is not dynamic. If we need to update the enum value, we need to update the Status enum, so why can't we do that?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Hasan Ali Haolader