value = in_array( $value, array( self::FREE, self::PRO, self::NONE ), true ) ? $value : self::NONE; } /** * Create the free-safe plan. */ public static function free(): self { return new self( self::FREE ); } /** * Create a pro plan value for future active statuses. */ public static function pro(): self { return new self( self::PRO ); } /** * Create an empty plan. */ public static function none(): self { return new self( self::NONE ); } /** * Get plan value. */ public function get_value(): string { return $this->value; } /** * Whether the plan is pro. */ public function is_pro(): bool { return self::PRO === $this->value; } }