private
    function getMaxFightersByEntity($userGroups): int
    {
        return $userGroups
            ->sortByDesc(function ($group) {
                return $group->count();
            })
            ->first()
            ->count();
    }
private
    function getMaxFightersByEntity($userGroups): int
    {
        return $userGroups
            ->sortByDesc(function ($group) {
                return $group->count();
            })
            ->first()
            ->count();
    }
private function getMaxFightersByEntity ( $ userGroups ) : int { return $ userGroups -> sortByDesc ( function ( $ group ) { return $ group -> count ( ) ; } ) -> first ( ) -> count ( ) ; }
Get the biggest entity group.

@param $userGroups

@return int
Get the biggest entity group .