class FighterMatcher (View source)

The FighterMatcher is responsible for determining if two FighterDTOs represent the same fighter.

It uses a combination of Sherdog ID matching, alias dictionary, and fuzzy name matching to make this determination.

Example usage: $matcher = new FighterMatcher(); $fighter1 = new FighterDTO(name: 'Fighter A', sherdogId: 123); $fighter2 = new FighterDTO(name: 'Fighter A', sherdogId: 123); if ($matcher->isSame($fighter1, $fighter2)) { // The fighters are considered the same }

Methods

bool
isSame(FighterDTO $a, FighterDTO $b)

Determines if two FighterDTOs represent the same fighter based on their Sherdog ID or similar names.

Details

bool isSame(FighterDTO $a, FighterDTO $b)

Determines if two FighterDTOs represent the same fighter based on their Sherdog ID or similar names.

Parameters

FighterDTO $a

The first fighter to compare.

FighterDTO $b

The second fighter to compare.

Return Value

bool

True if the fighters are considered the same, false otherwise.