Get a single team from the statistic-state.

@param object $statisticState
@param string $teamKey        name of the team

@return object
500166
public static function selectTeamItem(
        $statisticState,
        $teamKey
    ) {
        $statisticState = (object) $statisticState;
        $teamKey = (string) $teamKey;

        $teamItem = $statisticState->team->$teamKey;

        return $teamItem;
    }
659195
protected function getCached(string $playerName, string $cacheKey)
    {
        $playerCacheKey = strtolower($playerName);

        if (!isset($this->cache[$cacheKey][$playerCacheKey])) {
            return null;
        }

        return $this->cache[$cacheKey][$playerCacheKey];
    }
830261
private static TeamInfo randomTeam(ArrayList<TeamInfo> list) {
    int index = random.nextInt(list.size());
    TeamInfo team = list.get(index);
    // If the selected team is expired, remove it and return a new team.
    long currTime = System.currentTimeMillis();
    if ((team.getEndTimeInMillis() < currTime) || team.numMembers() == 0) {
      System.out.println("\nteam " + team + " is too old; replacing.");
      System.out.println("start time: " + team.getStartTimeInMillis()
        + ", end time: " + team.getEndTimeInMillis()
        + ", current time:" + currTime);
      removeTeam(index);
      // Add a new team in its stead.
      return (addLiveTeam());
    } else {
      return team;
    }
  }
1239214
def get_projected_player_game_stats_by_team(self, season, week, team_id):
        
        result = self._method_call("PlayerGameProjectionStatsByTeam/{season}/{week}/{team_id}", "projections", season=season, week=week, team_id=team_id)
        return result
314690
def _get_team(cls, soup):
        
        team = cls.Team()
        team.team_type = soup['type']
        team.id = soup['id']
        team.name = soup['name']
        return team
1119493
private function syncModels($relationship, $objects, $team, $detaching)
    {
        if (!Helper::isValidRelationship($relationship)) {
            throw new InvalidArgumentException;
        }

        $objectType = Str::singular($relationship);
        $mappedObjects = [];
        $useTeams = Config::get('laratrust.use_teams');
        $team = $useTeams ? Helper::getIdFor($team, 'team') : null;

        foreach ($objects as $object) {
            if ($useTeams && $team) {
                $mappedObjects[Helper::getIdFor($object, $objectType)] = [Helper::teamForeignKey() => $team];
            } else {
                $mappedObjects[] = Helper::getIdFor($object, $objectType);
            }
        }

        $relationshipToSync = $this->$relationship();

        if ($useTeams && $team) {
            $relationshipToSync->wherePivot(Helper::teamForeignKey(), $team);
        }

        $result = $relationshipToSync->sync($mappedObjects, $detaching);

        $this->flushCache();
        $this->fireLaratrustEvent("{$objectType}.synced", [$this, $result, $team]);

        return $this;
    }
738359
def get_team_players(self, team):
        
        team_id = self.team_names.get(team, None)
        try:
            req = self._get('teams/{}/'.format(team_id))
            team_players = req.json()['squad']
            if not team_players:
                click.secho("No players found for this team", fg="red", bold=True)
            else:
                self.writer.team_players(team_players)
        except APIErrorException:
            click.secho("No data for the team. Please check the team code.",
                        fg="red", bold=True)
251296
public static function selectPlayerList(
        $statisticState
    ) {
        $statisticState = (object) $statisticState;

        $playerList = [];
        foreach ($statisticState->player as $playerKey => $playerItem) {
            $playerList[$playerKey] = $playerItem;
        }

        return $playerList;
    }
744061
@Override
    public final Integer getCost(final SponsorTeam team) {
        Integer valoration;

        checkNotNull(team, "Received a null pointer as the team");

        valoration = 0;
        for (final TeamPlayer player : team.getPlayers().values()) {
            valoration += player.getCost();
        }

        valoration += team.getCoachingDice() * getDieCost();
        valoration += team.getNastySurpriseCards() * getSabotageCost();
        valoration += team.getSpecialMoveCards() * getSpecialMoveCost();
        valoration += team.getCheerleaders() * getCheerleaderCost();
        valoration += team.getWagers() * getWagerCost();
        valoration += team.getMediBots() * getMediBotCost();

        return valoration;
    }
491235
public Future<List<LeagueList>> getLeagues(String teamId) {
        return new ApiFuture<>(() -> handler.getLeagues(teamId));
    }
121676
public function getById($teamId, array $queryParams = [])
    {
        $response = $this->api->teams()->getById($teamId, $queryParams);

        return new TeamResponse($response);
    }
1359632
def get_players(self, team):
        
        team_id = self.__get_team_id(team)
        self.logger.debug(f'Getting players of team {team_id}.')
        return self._request('teams', team_id, 'players')
276222
public static function fetchTeam($team = null)
    {
        if (is_null($team) || !Config::get('laratrust.use_teams')) {
            return null;
        }

        return static::getIdFor($team, 'team');
    }
527741
function removeTeam($competitionId, $teamId)
	{
		if(!$competitionId)
		{
			throw new Exception('Invalid competitionId');
		}
		if(!$teamId)
		{
			throw new Exception('Invalid teamId');
		}

		return $this->execute('DELETE', '/competitions/%d/teams/%d/', array($competitionId, $teamId));
	}
1239802
public function get($commandKey, $cacheKey)
    {
        if ($this->exists($commandKey, $cacheKey)) {
            return $this->cachedResults[$commandKey][$cacheKey];
        }

        return null;
    }
525743
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::STATS_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedStats()->offsetGet($key);
    }
268467
@Override
    public final Integer getCost(final AdvancementTeam team) {
        Integer valoration;

        checkNotNull(team, "Received a null pointer as the team");

        valoration = team.getCash();
        for (final AdvancementTeamPlayer player : team.getPlayers().values()) {
            valoration += player.getValoration();
        }

        valoration += team.getCoachingDice() * getCostDie();
        valoration += team.getDreadballCards() * getCostCard();
        valoration += team.getCheerleaders() * getCostCheerleader();

        if (team.getDefensiveCoachingStaff()) {
            valoration += getCostCoaching();
        }
        if (team.getOffensiveCoachingStaff()) {
            valoration += getCostCoaching();
        }
        if (team.getSupportCoachingStaff()) {
            valoration += getCostCoaching();
        }

        return valoration;
    }