src/Workout/SportGuesser.php
public static function guess(string $code) : string
    {
        switch (strtolower(trim($code))) {
            case SportMapperInterface::RUNNING:
            case 'run':
                return SportMapperInterface::RUNNING;
            case SportMapperInterface::CYCLING_SPORT:
            case 'cycling':
                return SportMapperInterface::CYCLING_SPORT;
            case SportMapperInterface::CYCLING_TRANSPORT:
                return SportMapperInterface::CYCLING_TRANSPORT;
            case SportMapperInterface::SWIMMING:
                return SportMapperInterface::SWIMMING;
            default:
                return SportMapperInterface::OTHER;
        }
    }
public static function guess(string $code) : string
    {
        switch (strtolower(trim($code))) {
            case SportMapperInterface::RUNNING:
            case 'run':
                return SportMapperInterface::RUNNING;
            case SportMapperInterface::CYCLING_SPORT:
            case 'cycling':
                return SportMapperInterface::CYCLING_SPORT;
            case SportMapperInterface::CYCLING_TRANSPORT:
                return SportMapperInterface::CYCLING_TRANSPORT;
            case SportMapperInterface::SWIMMING:
                return SportMapperInterface::SWIMMING;
            default:
                return SportMapperInterface::OTHER;
        }
    }
public static function guess ( string $ code ) : string { switch ( strtolower ( trim ( $ code ) ) ) { case SportMapperInterface :: RUNNING : case 'run' : return SportMapperInterface :: RUNNING ; case SportMapperInterface :: CYCLING_SPORT : case 'cycling' : return SportMapperInterface :: CYCLING_SPORT ; case SportMapperInterface :: CYCLING_TRANSPORT : return SportMapperInterface :: CYCLING_TRANSPORT ; case SportMapperInterface :: SWIMMING : return SportMapperInterface :: SWIMMING ; default : return SportMapperInterface :: OTHER ; } }
Get the sport code from the tracker sport code.

@param string $code The code from the tracker.
@return string
Get the sport code from the tracker sport code .