class FightMethodNormalizer (View source)

Class responsible for normalizing fight method strings to FightMethod enum values.

Methods

static FightMethod|null
normalize(string $method)

Normalize a fight method string to a FightMethod enum value.

Details

static FightMethod|null normalize(string $method)

Normalize a fight method string to a FightMethod enum value.

Parameters

string $method

The fight method as a string (e.g., "KO", "Submission", "Decision").

Return Value

FightMethod|null

The corresponding FightMethod enum value, or null if the method is unrecognized.