src/Map/Row/Normalizer/Field/Type/GoalsNormalizer.php
public static function getBonusByRole(string $role): float
    {
        switch ($role) {
            // To know the number of goals scored by goalkeeper, it needs to be extracted from the MagicPoints
            case Row::GOALKEEPER:
                return GoalsNormalizer::STANDARD_GOALKEEPER_MALUS;
            case Row::DEFENDER:
                return GoalsNormalizer::FORMAT_2017_DEFENDER_GOAL_BONUS;
            case Row::MIDFIELDER:
                return GoalsNormalizer::FORMAT_2017_MIDFIELDER_GOAL_BONUS;
            case Row::PLAYMAKER:
                return GoalsNormalizer::FORMAT_2017_PLAYMAKER_GOAL_BONUS;
            case Row::FORWARD:
            default:
                return GoalsNormalizer::FORMAT_2017_FORWARD_GOAL_BONUS;
        }
    }
public static function getBonusByRole(string $role): float
    {
        switch ($role) {
            // To know the number of goals scored by goalkeeper, it needs to be extracted from the MagicPoints
            case Row::GOALKEEPER:
                return GoalsNormalizer::STANDARD_GOALKEEPER_MALUS;
            case Row::DEFENDER:
                return GoalsNormalizer::FORMAT_2017_DEFENDER_GOAL_BONUS;
            case Row::MIDFIELDER:
                return GoalsNormalizer::FORMAT_2017_MIDFIELDER_GOAL_BONUS;
            case Row::PLAYMAKER:
                return GoalsNormalizer::FORMAT_2017_PLAYMAKER_GOAL_BONUS;
            case Row::FORWARD:
            default:
                return GoalsNormalizer::FORMAT_2017_FORWARD_GOAL_BONUS;
        }
    }
public static function getBonusByRole ( string $ role ) : float { switch ( $ role ) { // To know the number of goals scored by goalkeeper, it needs to be extracted from the MagicPoints case Row :: GOALKEEPER : return GoalsNormalizer :: STANDARD_GOALKEEPER_MALUS ; case Row :: DEFENDER : return GoalsNormalizer :: FORMAT_2017_DEFENDER_GOAL_BONUS ; case Row :: MIDFIELDER : return GoalsNormalizer :: FORMAT_2017_MIDFIELDER_GOAL_BONUS ; case Row :: PLAYMAKER : return GoalsNormalizer :: FORMAT_2017_PLAYMAKER_GOAL_BONUS ; case Row :: FORWARD : default : return GoalsNormalizer :: FORMAT_2017_FORWARD_GOAL_BONUS ; } }
Returns the goal bonus given the role
@param string $role
@return float
Returns the goal bonus given the role